[Zope] Bug? Traversable.absolute_url

Dieter Maurer dieter@handshake.de
Wed, 31 Jul 2002 23:09:55 +0200


Thomas Guettler writes:
 > ...
 > In self.absolute_url()
 > 
 > Traceback (most recent call last):
 > ..
 >      return join([req['SERVER_URL']] + req._script + path, '/')
 > KeyError: SERVER_URL
Almost surely, your "self" is not acquisition wrapped.
This implies, that the request object is not reachable from it and
"absolute_url" (which is dependent on the request object) fails.

You might use "getPhysicalPath" instead of "absolute_url",
when you need a path independent from REQUEST.


Dieter