Re: [Zope-dev] standard_error_message does nothing?
Well, I'll try to share some Zope zen obtained after fighting with "weird standard_error_message behaviour" phenomena. It might sound very weird, but to make standard_error_message behave it should/you expect it to, it must contain sufficient HTML to properly show itself. Don't ask why... I don't know :) Seems that this works fine: [standard_error_message] In contrast with following, which does not work as expected: [standard_error_message] [standard_html_header] [standard_html_footer] Though, you need to make sure that any DTML code included in standard_error_message would not raise any exceptions (NotFound, KeyError etc...). In this case Zope will render error message that is defined in _error_html() in HTTPResponse.py, which is fine. OTOH, above hack works with almost all error types, but Unauthorized. Can anyone provide any sound explanation? Also, are there any _proper_ ways of redefining error message in Products? And why is it so, that (at least in 2.2.x) you can not remove standard_html_[header|footer] from Zope root? Does it have anything to do with being mentioned in /standard_error_message? Regards, Alex. -- Complex problems have simple, easy-to-understand wrong answers. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] standard_error_message does nothing?
My site uses SiteAccess2, zope 2.2.2, etc. If I got to one of my virtual hosts and enter a bogus URL, I get an error message that includes *another* error message within it (both from HTTPResponse.py's _error_html(). Example: http://docwhat.gerf.org:9673/fish I have modified _error_html() to put a comment at the very start saying where it came from. In addition, the root standard_html_message has a comment at the top and so does the /docwhat stdandard_html_message, both saying which it is. /docwhat is the folder that docwhat.gerf.org's vhost/siteroot is at. The fish url above should generate (I thought) my standard_html_message from /docwhat. I don't understand this at all. It goes against the docs in http://www.zope.org/Members/JohnC/StandardErrorMessage My site includes a view_source that works fairly well, if you want to see the various standard_html_message's. linuxasm.gerf.org is a non-siteaccessed version of my site, with no siteaccess rules. Here are the URLs: docwhat one: http://docwhat.gerf.org:9673/standard_error_message/view_source root one: http://linuxasm.gerf.org:9673/standard_error_message/view_source Thanks for any help. Ciao! -- Those are my principles. If you don't like them I have others. -- Groucho Marx The Doctor What: Second Baseman http://docwhat.gerf.org/ [EMAIL PROTECTED] KF6VNC ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )