Rob Miller wrote:
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.
I'll check that. Pointing index_html to the OFS one is probably sufficient.
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.
Ah yes, actually I'm taking care of all that by using the
standard-for-quite-some-time getId(), and making sure the id is stored in
the id attribute (and not __name__ anymore) using _setId explicitely. I also
keep a backward compat id() method for old instances.
I'll remove the old comment that threw you off.
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests