• Jérome Perrin's avatar
    standard_error_message: Adjust exception context for Zope 4 · 958c9948
    Jérome Perrin authored
    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>, ...]
    958c9948
standard_error_message.py 1.05 KB