I have a Python product which defines a __before_publishing_traverse_ method. At last I thought it would all work fine now...

Now I added one of my User Folder objects and got an exception because __before_publishing_traverse__ was called with only two arguments instead of three. Quite curious (because of course I don't call this method myself) I had a look at ZPublisher/BaseRequest.py, line 251, and noticed it is called there without providing the REQUEST. When I monkeypatched this method to hand over the request as the third argument, Zope complained that the "global name 'UNSPECIFIED_ROLES'" was not defined (and nothing worked anywhere anymore).

So should I make the REQUEST an _optional_ argument to my __before_publishing_traverse__ method? But the purpose of my b.p.t. method is to remove up to two path elements from REQUEST['TraversalRequestNameStack'] and set request variables appropriately, so what is the purpose of this call in BaseRequest? Is there an article anywhere which explains the whole topic in an understandable way?



(Zope 2.6.2,

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to