Sorry for late reply.
There is no Five in this environment. The "solution" was to remove the
CookieCrumbler instance inside the MyApp instance. CookieCrumber (1.2)
doesn't have a __before_publishing_traverse__ method but it does have
def __call__(self, container, req):
'''The __before_publishing_traverse__ hook.'''
resp = self.REQUEST['RESPONSE']
attempt = self.modifyRequest(req, resp)
if req.get('disable_cookie_login__', 0):
...more stuff I don't understand...
I tried setting up a similar environment (quickly) and a simple
application that uses __before_publishing_traverse__() but could get it
to stop working just because I put in a CookieCrumber instance :(
Removing the CookieCrumbler object obviously isn't a good enough
solution because we need it for pretty logins. At the moment I don't
understand how CookieCrumbler could have anything to do with it. It's
stuff it does surrounding the REQUEST looks sane and I don't understand
how it could effect my application.
Dieter Maurer wrote:
Peter Bengtsson wrote at 2007-3-23 13:29 +0000:
I have a product that looks like this::
meta_type = 'x'
""" doc str """
def __before_publishing_traverse__(self, object, request=None):
When I view objects of this class I'd expect Zope to call the
__before_publishing_traverse__ hook and print HOUSTON, but it doesn't :(
if object.__class__.__name__ == 'MyApp':
print object.__before_publishing_traverse__(object, self)
path = request.path = request['TraversalRequestNameStack']
When I look at the output of this I get:
<bound method MyApp.foobar of <MyApp at /IMS>>
Maybe, instead of "foobar", you should print "__before_publishing_traverse__".
"Five" started to fiddle around with "__before_publishing_traverse__"
(to make Zope 3 traversal available) and maybe this introduced
the bug no longer to call the existing "__before_publishing_traverse__"?
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -