-
Aurel authored
There are some few differences: In Zope4 exceptions are callable, but we don't want to call them here, so we use a python: expression instead of the path expression which tries to call error_value. error_message is sometimes not passed. The context is different: Since Zope 4, the `standard_error_message` is rendered in the context of REQUEST['PUBLISHED'], which in case of publishing a skin (page template or script) in the context of a document is is the skin itself, but for error rendering in case of erp5_web Web Site or Web Section, we expect standard_error_message_template to always be rendered in the context of the document, that's why we use REQUEST.PARENTS[0] as context. REQUEST.PUBLISHED = <PythonScript at /erp5/script used for /erp5/module/document> REQUEST.PARENTS [<Document>, <Module>, <ERP5Site>, ...] In case of redirect, the body is no longer empty, but we explicitly return an empty body to keep the same behavior as zope2
cbda4d83