[Zope-CMF] Re: getUtility(ISiteRoot) bug?

Philipp von Weitershausen philipp at weitershausen.de
Thu Mar 8 12:26:49 EST 2007


yuppie wrote:
>         portal = getUtility(ISiteRoot)
> 
> 
> I can't get this working. The lookup from within getExprContext fails. But:
> 
> - sm.registeredUtilities() contains the ISiteRoot registration

Is 'sm' actually the current site manager? Try to compare whether 
z.c.getSiteManager() matches 'sm'.

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


-- 
http://worldcookery.com -- Professional Zope documentation and training



More information about the Zope-CMF mailing list