[Zope] Custom identification Error page

Joachim Werner joe@iuveno-net.de
Fri, 3 Aug 2001 22:29:54 +0200


> I've change my standard_error_message method. But it's not enough. How can
I
> change the page that my guests will see when they do a "Site Error" like
> Unauthorized, Debugging notice... ?

Hi!

The errors that have to do with authorization are handled by ZPublisher. If
you are not authorized, ZPublisher will not let you access anything, not
even standard_error_message. That's why these error messages were hard-coded
into ZPublisher at

"HTTPResponse.py" in lib/python/ZPublisher, starting at line 496

You can change the HTML code there if you want to have a customized error.
You might also put an HTML-based redirect into the HTML header and redirect
it to some non-protected Zope error page. I have the feeling that this
should change with some later version of Zope -- having hardcoded HTML error
messages in the Python code is not THAT cool ...

Joachim