On Friday 04 January 2008, Hermann Himmelbauer wrote:
> My problem is that the update() function which sets the link does not
> always work. The link should always include the URL of the local site
> object, which is does not when a 404 page is displayed, therefore all menu
> entries have invalid links.
> Does anyone know why, or does someone have a better suggestion to my
> problem?

Right, this is a common problem for *all* context driven pieces of 
information. It happens, because the error does not have a parent in that 
particular case. When an exception is raised and not caught, it penetrates 
back all the way to the publisher. The publisher then takes the exception and 
looks up a view. When possible, the exception is wrapped in a location proxy 
with the parent being the last object in the publisher, which is either the 
application root or the object that got traversed. (see 
zope.publisher.publish.publish and zope.app.publication.zopepublication, line 

Now, I know that Roger has struggled with this problem recently too. I am not 
sure whether he has a solution. If he doesn't, we should think of one. Now, 
404 might be special and maybe the 404 error page should not display menus 
and other stuff.

Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
Zope3-users mailing list

Reply via email to