Jean-Marc Orliaguet wrote:
I think I've identified an issue with the TTW local utilities
registration (svn trunk), I'm not sure how this is solved (it could be
I have a folder that acts as a persistent components registry:
class SomeFolder(..., PersistentComponents)
which means that it can hold information about locally registered
utilities, adapters, ...
The problem is that when I register a SomeFolder as a local utility,
instead of getting registered in the site manager "above", it gets
registered "in itself", so basically it never gets registered in the
to reproduce the issue simply subclass PersistentComponents, and do a
PersistentComponents.__init__(...) on an existing component (.e.g
HelloWorld); you will be able to register it as a local utility but it
won't appear in the site manager's registrations.
well, the bug is here:
def register(self, action, data):
sm = component.getSiteManager(self.context)
in that case 'sm' and 'context' are the same.
I've filed a bug at:
a solution would be to get the site manager on the parent folder, eg.
if sm == context:
sm = component.getSiteManager(getParent(context))
Zope3-dev mailing list