Charlie Clark wrote:

Am 29.06.2007 um 10:37 schrieb yuppie:

Looks like your utility isn't acquisition wrapped - getProperty is usually acquired from the site root.

1.) Your site seems to broken, there is currently no migration code that updates the lookup class if you have an old site manager instance.

2.) getProperty should become part of the IPropertiesTool interface and implementation. It should not rely on acquisition.

It's coming from the script:

return context.index_html_template(**decode(options, script))

How should I be wrapping that?

You shouldn't, getUtility should.

Can you please test the attached patch? It should fix your site manager instance on the fly.

Cheers, Yuppie

Index: CMFCore/
--- CMFCore/     (revision 77185)
+++ CMFCore/     (working copy)
@@ -16,6 +16,7 @@

 from five.localsitemanager import find_next_sitemanager
+from five.localsitemanager.registry import FiveVerifyingAdapterLookup
 from five.localsitemanager.registry import PersistentComponents
 from Globals import InitializeClass
 from Products.Five.component.interfaces import IObjectManagerSite
@@ -67,6 +68,11 @@
             name = '/'.join(self.getPhysicalPath())
             self._components = PersistentComponents(name, (next,))
             self._components.__parent__ = self
+ elif self._components.utilities.LookupClass != FiveVerifyingAdapterLookup: + self._components.utilities.LookupClass = FiveVerifyingAdapterLookup
+            self._components.utilities._createLookup()
+            self._components.utilities.__parent__ = self._components
+            self._components.__parent__ = self
         return self._components

     def __before_publishing_traverse__(self, arg1, arg2=None):

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to