[Zope-dev] Traversal Barf

seb bacon seb@jamkit.com
Wed, 11 Jul 2001 11:28:42 +0100


OK, I've found out some more stuff about the problem.  Of course, it
wasn't really random.  The culprit is a linked stylesheet.  Every time
I alter the sheet in some way, I get the SERVER_URL KeyError.

I can't really see why this should be happening, though.  The 
absolute_url() in question is in the main body of the document, not
the stylesheet.  

Is perhaps the acquisition wrapper not getting applied to the document
until after the linked objects are also downloaded, or something
strange like that?

I haven't the time time to pursue this right now, but I'll attempt to
make a simple, reproduceable example and submit it to the Tracker.
But just in case I get time to debug it, where might I start?  I'm not
very familiar with the Traversal / Publishing stuff.

seb

* seb bacon <seb@jamkit.com> [010711 10:04]:
> * Steve Alexander <steve@cat-box.net> [010711 07:59]:
> > >>KeyError: SERVER_URL
> 
> > > I have seen a similar traceback which was due to a bug in CopyPaste.py,
> > > to which I have submitted a patch. It had to do with a lack of an
> > > acquisition wrapper at an inopportune time. It looks as though
> > > absolute_url() is being called without a proper wrapper around the
> > > object it is begin called for.
> 
> > Looks to me like absolute_url() is being called when absolute_url(1) 
> > should be used.
> 
> I didn't know about the absolute_url(relative=1) switch.  Do virtually
> hosted envirnoments not have a SERVER_URL variable?  
> 
> However, I don't think this is the problem.  
> 
> (1) I'm not in a virtual hosting scenario
> (2) it happens at fairly random intervals *on the same page*.