[zope2-tracker] [Bug 1542031] Re: 2.13.23 broken in resolving <dtml-var> tags

pseudonomous 1542031 at bugs.launchpad.net
Tue Mar 15 07:03:07 CET 2016


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:

<dtml-var standard_html_header>
<p>
Hello World!
</p>
<dtml-var standard_html_footer>

Down in the root folder I have these 2 dtml methods:

standard_html_header:
<html>
  <head><title>&dtml-title_or_id;</title></head>
  <body bgcolor="#FFFFFF">

standard_html_footer:
  </body>
</html>

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__
   - <DTMLMethod at /test>
   - 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 <dtml-var> tags

To manage notifications about this bug go to:
https://bugs.launchpad.net/zope2/+bug/1542031/+subscriptions


More information about the zope2-tracker mailing list