[Zope-CMF] Bad interaction between CMF 1.4 and Zope 2.8 (catalog-getObject-raises)

Chris Withers chris at simplistix.co.uk
Wed Apr 20 10:31:44 EDT 2005


Sidnei da Silva wrote:
> Specifically, in CMFCatalogAware.reindexObjectSecurity (recently
> introduced by Florent Guillaume if I recall), it assumes getObject()
> will return None in a failure.

reindexObjectSecurity is as old as the hills to the best of my 
knowledge, what was it Florent introduced?

>   Module Products.ZCatalog.CatalogBrains, line 74, in getObject
>   Module OFS.Traversable, line 232, in restrictedTraverse
>   Module OFS.Traversable, line 181, in unrestrictedTraverse
>    - __traceback_info__: ([], '1113527681')
>   Module Products.CMFDefault.DiscussionItem, line 224, in
>   __bobo_traverse__
> AttributeError: 'dict' object has no attribute 'RESPONSE'

This seems like a pretty bad bug which should NOT be masked by getObject 
jus treturning None. Sheesh.

> 1. It is wrong in assuming getObject will return None. Well, actually
>    it wasn't, but the carpet has been took away from under us :)

See my comments on other lists about how insane it is to support the 
belief that getObject should swallow all errors, not log anything, and 
just return None...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-CMF mailing list