[Grok-dev] getSite returning None...

Souheil CHELFOUH trollfot at gmail.com
Fri Mar 5 05:50:17 EST 2010


The site is set upon traversal. It's maybe a problem in that operation.
Have you tried to hook up a pdb in your property to see what's happening ?
Do you have a test in your property to see what it returns ?
Can you give us more info

2010/3/5 Jeroen Michiel <jmichiel at yahoo.com>:
>
> Hi,
> I'm having a strange problem im megrok.navigation.
> For site menuitems (linking to a view of the closest site object), I use the
> getSite function from zope.app.component.hooks (for Grok 1.0) in a property
> method which gets called when the template is rendered.
> However, it seems that in my current configuration, getSite returns None at
> that time, while it works perfectly in another project (using Grok1.1a1,
> however).
> What could be the reason, or is it just unsafe to use the getSite function
> for that purpose, and should I do that diferently?
>
> thx
> --
> View this message in context: http://old.nabble.com/getSite-returning-None...-tp27792398p27792398.html
> Sent from the Grok mailing list archive at Nabble.com.
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
>


More information about the Grok-dev mailing list