[Zope] Globals disappearing in extmethod?

Joseph A Knapka jknapka@earthlink.net
Mon, 04 Feb 2002 14:33:45 +0000


Joseph A Knapka wrote:
> Mine is Zope 2.5.0 on WinNT4, IE6, Navigator4.77. And now that
> I try it again, I cannot reproduce this behavior myself, though
> I definitely saw it earlier. I must have been doing something
> differently in the script.
> 
> Also, I rewrote my original code (the CGI app wrapper mentioned
> in my original message) to always pass REQUEST as a parameter
> to all code that uses it, rather than assigning it to a global;
> that code worked flawlessly. Then I rewrote it again to store
> REQUEST as a global, and that, too, is working fine now. So
> apparently this is all a case of pilot error. If I find out any
> further information, such as exactly what stupid thing I was doing
> to cause the problems I saw, I'll post a message :0-/

OK, I lied, Zope wasn't using the re-globalfied version, which
still breaks. However, I've managed to narrow the problem down:
The problem with global data being "missing" only
happens when the DTML doc that calls my external method is
invoked from a particular other DTML document.

Also, I discovered that if I create an empty module
called "myGlobals", and explicitly place all my
global data there, everything works. Still confused,
trying to build a simple case that breaks the same
way as my original code.

Cheers,

-- Joe
"I should like to close this book by sticking out any part of my neck
 which is not yet exposed, and making a few predictions about how the
 problem of quantum gravity will in the end be solved."
 --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"