I'm facing a small issue with CMF 1.4 and the new 'feature' in Zope 2.8
of letting exceptions through if getObject fails, instead of returning

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

This results in a traceback like this:

  Module Products.CMFDefault.DiscussionItem, line 311, in createReply
  Module Products.CMFCore.CMFCatalogAware, line 102, in
  Module Products.CMFCore.WorkflowTool, line 360, in notifyCreated
  Module Products.CMFCore.WorkflowTool, line 706, in
  Module Products.CMFCore.CMFCatalogAware, line 81, in
  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
AttributeError: 'dict' object has no attribute 'RESPONSE'

There's two things going on here:

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 :)
2. If I understand correctly, it's trying to traverse to the
   newly-created DiscussionItem which though it's indexed, will not be
   available but two lines after the top-level call, on createReply,
   line 313.

I assume there's a reason for the object to be indexed before being
stored, so I won't try to guess what the correct fix is.

Any ideas?

Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true

User hostile.
Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to