[Zope-CMF] getUtility(ISiteRoot) bug?

yuppie y.2007- at wcm-solutions.de
Thu Mar 8 12:17:52 EST 2007


Hi!


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

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

by::

         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?


TIA,

	Yuppie



More information about the Zope-CMF mailing list