2009/2/27 Jens W. Klein <j...@bluedynamics.com>:
> Hi,
>
> I use the the KGS of zope 3.5dev (I need Python 2.6 because of third
> party code i integrate) and try to build a simple site and add a local
> component registry using a subscriber. It looks like I missed something -
> or I hit a bug in zope3.5dev. But before I report a bug I want to be sure
> that it isnt my fault.
>

...snip code and traceback...

>
> It calls the subscriber, adds the LocalSiteManager and then another event
> happens and the subscriber zope.site.site.changeSiteConfigurationAfterMove
> is called (line 251). Here is the code in there:
>
>    if event.newParent is not None:
>        next = _findNextSiteManager(site)
>        site.getSiteManager().__bases__
>
> next is None here, so __bases__ has a None in the list.
>
> Btw., the way the sitemanager is added is the same as described in
> Phillip von Weiterhausens book.
>
> Whats wrong?

It assumes that the root folder has its own component registry, but
the rootFolder factory doesn't create one, so it returns none as the
next site manager. So, you need to call setSiteManager for the root
folder after creating it. However, I guess this case should be handled
by zope.site's event handler. I'll take a look at that tomorrow.

-- 
WBR, Dan Korostelev
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to