[z3-five] handler not getting called

Philipp von Weitershausen philipp at weitershausen.de
Wed Oct 11 21:46:53 CEST 2006


yary wrote:
> I'm trying to add a handler, but it doesn't get called. ZCML:
> 
>     <five:traversable class=".portal.QSite" />
>     <five:traversable class="OFS.Folder.Folder" />
>     <five:implements class=".portal.QSite"
>           interface=".portal.IQSite"
>           />
>       <subscriber
>       for=".portal.IQSite zope.app.container.interfaces.IObjectEvent"
>       handler=".portal.addedQSite"
>       />
> 
> currently addedQSite prints a debug message and then throws an
> exception- trying to make it hard to miss... but I can create a QSite
> and not see the debug message or exception. My first attempt I used
> IObjectAddedEvent, and switched to IObjectEvent to try and catch any
> event, still nothing calls my addedQSite on add or delete. Any ideas
> on how to fix?

How are you creating a QSite object? Most of Zope 2 or the CMF doesn't 
send events yet, unfortunately. It would be a nice sprint topic or task 
to add such events to Zope 2, though.

Philipp



More information about the z3-five mailing list