[Zope-CMF] CMF: registerDirectory case sensitive ?
Fritz Loseries
fritz at loseries.info
Sun May 30 10:13:40 EDT 2010
Hi,
I just got a problem where I think that there is a conflict with case
sensitive registration.
Through zcml I've registered "Filesystem Directory Views" using
Uppercase for the first letter:
<cmf:registerDirectory name="mytheme_images/Stammbaeume"/>
<cmf:registerDirectory name="mytheme_images/Stammbaeume/Koschmieder"/>
Then I've imported some document.zexp from another site.
Within HTML code src of img is "../stammbaeume/koschmieder/img/image.png"
Image will not be presented, because now image.png is no longer in the
subdir img.
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.
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.
Regards,
Fritz Loseries
More information about the Zope-CMF
mailing list