[ZCM] [ZC] 641/ 2 Resolve "BeforeTraverse: bad acquisition"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Tue, 17 Jun 2003 13:47:11 -0400
Issue #641 Update (Resolve) "BeforeTraverse: bad acquisition"
Status Resolved, Zope/bug+solution medium
To followup, visit:
http://collector.zope.org/Zope/641
==============================================================
= Resolve - Entry #2 by Brian on Jun 17, 2003 1:47 pm
Status: Pending => Resolved
Thanks - fixed for 2.6.2 / 2.7
________________________________________
= Request - Entry #1 by d.maurer on Oct 25, 2002 6:19 am
Uploaded: "BeforeTraverse.pat"
- http://collector.zope.org/Zope/641/BeforeTraverse.pat/view
ZPublisher.BeforeTraverse.NameCaller.__call__
can wrongly acquire "func_code".
This happens, e.g. for URLs of the form
.../DTMLMethod/.../CMFPortal/...
The result is a
2002-10-25T09:42:09 ERROR(200) BeforeTraverse Error while invoking hook: "cookie_authentication"
Traceback (innermost last):
File /home/dieter/Haufe/src/Zope/lib/python/ZPublisher/BeforeTraverse.py, line 127, in __call__
TypeError: __call__() takes exactly 3 arguments (4 given)
The reason is "getattr(meth,'func_code',None)"
acquires the "func_code" of the DTMLMethod.
Therefore, the number of arguments is faulty.
==============================================================