[Zope-CMF] Re: Five's local sitemanager, CMF, etc

Rocky rocky at serverzen.com
Fri Feb 23 08:02:09 EST 2007

On Feb 23, 8:10 am, yuppie <y.20... at wcm-solutions.de> wrote:
> I propose to hardcode PortalObjectBase as IObjectManagerSite. AFAICS
> getSiteManager() could create a component registry on the fly if
> necessary. So for that part we would neither need the new code in
> importVarious nor migration code.

While I'm typically against what is obviously an accessor method doing
any sort of writing to the zodb I would let it slide here for the sake
of avoiding a migration step.

But while this will ensure the cmf site is an ISite, there is still a
step missing.  There is no zpublisher hook registered to fire
traversal events when the site is traversed (which lets
zope.component.getUtility be aware of the closest site even when not
specifying a context).

See Products.Five.component.enableSite for an example of what needs to
be done here.  The five.localsitemanager.make_objectmanager_site call
invokes enableSite under the hood to setup this zpublisher hook.

Maybe someone has a neat idea for setting this up too? (I don't, other
then by a migration step)  Or maybe there is something GenericSetup
could do to setup a bit of migration?

- Rocky

More information about the Zope-CMF mailing list