On Thursday 27 Jun 2002 3:56 pm, Chris McDonough wrote:
You are indeed right, this is a bug. It happens because the editUser.dtml file references the name "user" without qualification, and finds the "user" folder in the root before it finds the "user" argument passed in as a keyword. I'm trying to figure out how to fix it now.
Oh yeah, sure, Zope is packed full of bugs like this. Its got alot better since Zope 2.0, but this is still a major problem. Try this patch, which will dump out any name looked up but not found in the root application object. Next, go poking around inside the management interface, or inside your favorite product. Some of these do not indicate a problem, but most are caused by dtml or acquisition-heavy code that uses the wrong namespace search order. For every name listed, you can change the behaviour of Zope by adding an object or property of the same name to the root folder. Index: Application.py =================================================================== RCS file: /cvs-repository/Zope/lib/python/OFS/Application.py,v retrieving revision 1.183 diff -r1.183 Application.py 83a84,89
def __getattr__(self,n,k={}): if not k.has_key(n): print >> sys.stderr,n k[n]=0 raise AttributeError(n)