From 1554880 at bugs.launchpad.net Wed Mar 9 05:21:40 2016 From: 1554880 at bugs.launchpad.net (pseudonomous) Date: Wed, 09 Mar 2016 04:21:40 -0000 Subject: [zope2-tracker] [Bug 1554880] [NEW] standard_error_template dtml method does not render properly when errors occur Message-ID: <20160309042140.5679.42753.malonedeb@chaenomeles.canonical.com> Public bug reported: Normally, when you try to visit a URL that is not mapped to any object in zope you get an error message like this, I'll copy and paste the html code in from "view-source" in my browser: MSCS

Site Error

An error was encountered while publishing this resource.

Resource not found

Sorry, the requested resource does not exist.

Check the URL and try again.

Resource: http://www.math.uic.edu/man


Troubleshooting Suggestions

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your patience.

What do I get in Zope2 (2.13.24)? Well, let's do the same thing: Zope <h2>Site Error</h2> <p>An error was encountered while publishing this resource. </p> <p><strong>Resource not found</strong></p> Sorry, the requested resource does not exist.<p>Check the URL and try again.</p><p><b>Resource:</b> oops GET</p> <hr noshade="noshade"/> <p>Troubleshooting Suggestions</p> <ul> <li>The URL may be incorrect.</li> <li>The parameters passed to this resource may be incorrect.</li> <li>A resource that this resource relies on may be encountering an error.</li> </ul> <p>For more detailed information about the error, please refer to the error log. </p> <p>If the error persists please contact the site maintainer. Thank you for your patience. </p> What does that render as? Well something vaguely resembling the html code the DTML document is supposed to produce. Surely that's not what's supposed to happen. ** Affects: zope2 Importance: Undecided Status: New -- You received this bug notification because you are a member of Zope 2 Developers, which is subscribed to Zope 2. https://bugs.launchpad.net/bugs/1554880 Title: standard_error_template dtml method does not render properly when errors occur To manage notifications about this bug go to: https://bugs.launchpad.net/zope2/+bug/1554880/+subscriptions From 1542031 at bugs.launchpad.net Tue Mar 15 07:03:07 2016 From: 1542031 at bugs.launchpad.net (pseudonomous) Date: Tue, 15 Mar 2016 06:03:07 -0000 Subject: [zope2-tracker] [Bug 1542031] Re: 2.13.23 broken in resolving tags References: <20160204205236.15806.73887.malonedeb@gac.canonical.com> Message-ID: <20160315060307.871.58647.malone@gac.canonical.com> I don't think this is a problem just with python scripts. I've got some zope dtml code that's pretty standard (in fact similar code appears in the zope2 book as example code) that includes one dtml method in another and it fails with a "KeyError". Create yourself a dtml method with contents:

Hello World!

Down in the root folder I have these 2 dtml methods: standard_html_header: &dtml-title_or_id; standard_html_footer: You'll get a traceback if you try to visit the "test" dtml method: Traceback (innermost last): Module ZPublisher.Publish, line 138, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 48, in call_object Module OFS.DTMLMethod, line 137, in __call__ - - URL: http://wwwtest:8080/test/manage_main - Physical Path: /test Module DocumentTemplate.DT_String, line 477, in __call__ KeyError: 'standard_html_header' This happens in zope 2.13.23 and the recently released 2.13.24. The method renders correctly in zope 2.13.22. Note: I filed another bug report about my standard_error_message DTML not rendering correctly; I strongly suspect that this is related to the bug here, but I can't be certain. -- You received this bug notification because you are a member of Zope 2 Developers, which is subscribed to Zope 2. https://bugs.launchpad.net/bugs/1542031 Title: 2.13.23 broken in resolving tags To manage notifications about this bug go to: https://bugs.launchpad.net/zope2/+bug/1542031/+subscriptions