I'm stuck. In CMFCore.Expression.getExprContext I tried to replace::

        utool = getUtility(IURLTool)
        portal = utool.getPortalObject()


        portal = getUtility(ISiteRoot)

I can't get this working. The lookup from within getExprContext fails. But:

- sm.registeredUtilities() contains the ISiteRoot registration

- if I first call getUtility(ISiteRoot) from somewhere else, the lookup doesn't fail in getExprContext either (I guess the result of some caching)

- getUtility(IURLTool) *does* work, and inside getPortalObject() looking up the ISiteRoot utility works as well

The lookup is in C code, I don't know C and how to debug that. No idea what's going wrong here.

Any pointers?



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

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

Reply via email to