2.13.23 broken in resolving <dtml-var> tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Easy to reproduce
Create a python script bug just containing:
return 1
Create a dmtl-document 'test'with in the same folder containing:
<dtml-var "bug()">
and a python script bug in the same folder:
return 1
view it in 2.13.22 and earlier just gives you
1
But 2.13.23 chokes on hat:
Site Error
An error was encountered while publishing this resource.
Error Type: NameError
Error Value: name 'bug' is not defined
And the error log:
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.DTMLDocument, line 98, in __call__
- <DTMLDocument at /BUG/test>
- URL: http://
- Physical Path: /BUG/test
Module DocumentTemplat
Module DocumentTemplat
- __traceback_info__: bug
Module <string>, line 1, in <expression>
NameError: name 'bug' is not defined
This is a complete killer and not just a flaw, it makes our whole web interface unusable
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> html_footer>
<p>
Hello World!
</p>
<dtml-var standard_
Down in the root folder I have these 2 dtml methods:
standard_ html_header: <title> &dtml-title_ or_id;< /title> </head>
<html>
<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): wwwtest: 8080/test/ manage_ main e.DT_String, line 477, in __call__ html_header'
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://
- Physical Path: /test
Module DocumentTemplat
KeyError: 'standard_
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.