Hi Charlie,

>> Changing it to "../stammbaeume/koschmieder/image.png"
>> Image will not be presented, because it is case sensitive.
>> Changing it to "../Stammbaeume/Koschmieder/image.png"
>> Image appears
>> But changing all src of img in a mass of documents is an 
>> unpracticable way.
> Why is it unpractical? If you know the exact pattern to replace it 
> should be easy enough to do this using a script.
Ok, I do not have an idea how I can write a script for changing CMF 
documents within a zexp-file. The documents are within the ZODB and I do 
not have indeep practice for this. Maybe it's easy, but I do not know it.

>> Thus I decided to change registration through zcml.
>> <cmf:registerDirectory name="mytheme_images/stammbaeume"/>
>> <cmf:registerDirectory name="mytheme_images/stammbaeume/koschmieder"/>
>> <cmf:registerDirectory 
>> name="mytheme_images/stammbaeume/koschmieder/img"/>
>> and moving images to subdir img, as well as changing case of directory
>> naming to lower case.
>> Restarting Zope again, using original version of the CMF document, no
>> image appears.
>> But I got following warning:
>> /usr/local/Plone/buildout-cache/eggs/Products.CMFCore-2.1.2-py2.4.egg/Products/CMFCore/DirectoryView.py:497:
>> UserWarning: DirectoryView img refers to a non-existing path
>> 'CMFPlone/skins/custom_image/Stammbaeume/Koschmieder'
>>    (self.id, reg_key), UserWarning)
>> Through ZMI content of Stammbaeume/Koschmieder/img is accessible.
>> This seems for me, that deleting a "Filesystem Directory View" and
>> restarting Zope (running zcml) will not empty and refill the registry.
>> Now I got a real conflict. I do not know, if this is a bug or if I can
>> get an advice how to change it through GenericSetup.
> Firstly, all Zope URLs are case-sensitive. Directory Views are nothing 
> more than storages for Zope objects in the file system. Secondly, you 
> need to do more than just register the directory in ZCML. This just 
> makes them available for the ZODB object of the File Directory View. 
> Once you've registered the new directory you can assign it to the 
> relevant Filesystem Directory View through its properties, or indeed 
> using GenericSetup.
Well, what do I have to do, that I will get upper case into lower case. 
With changing cmf:registerDirectory it has no effect as I've described 
In ZMI checking the properties of the Filesystem Directory View all is 
written in lower case but the UserWarning means it is Upper case. Even 
though the path in the Warning is strange because it is 
"...skins/custom_image/..." and not "...skins/mytheme_image/..."

Probably I will not see the easy solution.


Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to