[Zope-CMF] problems w/ 'File' type in CMF 1.6
Rob Miller
ra at burningman.com
Mon Nov 28 05:23:06 EST 2005
howdy,
in trying to get Plone working against the 1.6 branch i've come across
some problems w/ the way that CMFDefault.File.File is working since the
base classes have been reordered.
the biggest problem has to do w/ the default view lookup. when
OFS.Image.File was the first base class, then that class's index_html
method would be used as the default view. with PortalContent first,
however, index_html is None. this causes ZPublisher to use __call__,
but this then calls queryMethodId('(Default)') on the FTI, which returns
index_html, which is still None. when i add CMF File objects in a Plone
site and try to browse to them, i'm getting 404s; in a pure CMF site i
get a notice that 'index_html' has an empty or missing docstring.
the other problem, not as big an issue, has to do with the comment that
is immediately after the File class definition; it explicitly says that
the base classes should not be reordered b/c this would cover up the
id() method in the OFS.Image.File class. using getId() will always
work, of course, and i'm not even sure that covering the id() method
will actually break anything, but it probably deserves a little bit of
investigation and, if all is well, we should remove the misleading comment.
i'd dig deeper into this myself, but it's late and my bed is calling...
-r
More information about the Zope-CMF
mailing list