Chris Withers wrote:
Evan Simpson wrote:
Much better is to define a __before_publishing_traverse__ method on your object. Unfortunately, due to a longstanding bug in the hook machinery,
Is there a collector entry for this? What's the bug?
I was certain that there was a collector entry related to this, but I can't find it for the life of me. The bug is in MultiHook, and affects only classes that define a __before_publishing_traverse__ method. Normally, the method would be called with arguments (container, request) after being bound to the instance. MultiHook was carefully calling the underlying unbound function instead. Thus, if your method signature was (self, container, request), it would be called correctly until something else tried to use the hook (such as a VHM or Access Rule). I've checked in a fix for the 2.7 branch, but I haven't set up Subversion yet, so I haven't fixed the HEAD. Cheers, Evan @ 4-am