[Zope-dev] Re: Weird IndexableObjectWrapper + TopicIndex + aq_acquired interactions.

Lennart Regebro regebro at gmail.com
Tue Sep 20 11:42:32 EDT 2005


OK, so, for some reason some CMF objects fail when being indexed
because they are wrapped in an aq wrapper that wrapped an
IndexableObjectWrapper that wraps another aq_wrapper.

And sometimes, the same object do not fail in otehrwise very similar
situation. *sigh*.

So for example, this works fine:

    container._setObject(id, ob)
    ob = container._getOb(id)
    <returns to the workflows constructInstance method>
    <yadayadyada>
    ob.indexObject()

 All if fine. And this fails:

    container._setObject(id, ob)
    ob = container._getOb(id)
    ob.manage_permission(
        permission_to_manage='Access contents information',
        roles=ACCESS_CONTENTS_INFO_ROLES,
        acquire=0)
    <returns to the workflows constructInstance method>
    <yadayadyada>
    ob.indexObject()

Now, it only fails around every second time. Mhm. Nope, not everytime.
It's regukar, a unit test will fail on the same places both times, but
*exactly the same call* will still fail about every second time.
Hurray. I'm so happy this problem is so easy to track down! Grrr.

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope-Dev mailing list