[Zope-CMF] Re: Five's local sitemanager, CMF, etc
yuppie
y.2007- at wcm-solutions.de
Fri Feb 23 08:15:46 EST 2007
Rocky wrote:
> On Feb 23, 8:10 am, yuppie <y.20...-E2EsyBC0hj3+aS/vkh9bjw at public.gmane.org> 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?
http://svn.zope.org/?rev=72782&view=rev
I just added notify(BeforeTraverseEvent(self, REQUEST)) to DynamicType's
__before_publishing_traverse__.
Cheers, Yuppie
More information about the Zope-CMF
mailing list