On 2009-8-8 11:53, Hanno Schlichting wrote:
> On Sat, Aug 8, 2009 at 12:14 AM, Charlie Clark<char...@begeistert.org>  wrote:
>> Is the patch for Plone or CMF?
>
> It's for Plone, I guess. The "problem is solved" in Plone 4.0 itself
> (via monkey-patching CMF).
>
>> If it's for CMF then you should consider simply submitting a patch or
>> opening a branch. But before you write any package I would like to know a
>> little more about what exactly you want to do.
>
> The problem is the entire concept of opaque items. The only places I
> know they are still in use is the "talkback" objects as used by the
> discussion machinery in CMF. CMFUid also claims to implement the
> concept, but doesn't actually need any of the functionality, since it
> has its own event subscribers to deal with things.
>
> So the problem starts in
> CMFCore.CMFCatalogAware.dispatchToOpaqueItems, with the nice line:
>
> for opaque in ob.opaqueValues():
>
> which in turn calls later on the opaqueItems method which contains this 
> beauty:
>
> self_base = aq_base(self)
> for name in self_base.__dict__.keys()
>    obj = getattr(self, name)
>    if ICallableOpaqueItem.providedBy(obj):
>      items.append((obj.getId(), obj))
>
> The whole method redispatches any IObjectEvent fired on an
> IOpaqueItemManager to any opaque item in it. In doing so, it needs to
> load every single entry in the objects __dict__ to see if it is an
> ICallableOpaqueItem.
>
> It happens that the CMFCatalogAware base class is such an
> IOpaqueItemManager, so any essentially any content object gets this
> treatment.

Could it be that this considers dexterity content to be opaque items? I 
have some code where events are recursively re-dispatched by CMF and I 
suspect this is why.

Wichert.


-- 
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.
_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to