macros not traversable with Zope 2.13.9 and zope.pagetemplate 3.6.*
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I have updated an existing Zope 2.13.7 instance to Zope-2.13.9 and zope.pagetemplate 3.6.1 package. After the update page templates that used macros didn't work any more. Errors show that the "macros" attribute isn't traversable.
For example, a zope page template containing XHTML and a METAL macro like 'metal:
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: NotFound
Error Value: macros
...
Page templates without macros render correctly.
Here's the stack trace from the event.log:
2011-09-14T18:00:00 ERROR root Exception while rendering an error message
Traceback (most recent call last):
File "/usr/lib64/
raise_standardE
v = s(**kwargs)
File "/usr/lib64/
line 322, in __call__
return self._bindAndEx
File "/usr/lib64/
line 359, in _bindAndExec
return self._exec(
File
"/usr/lib64/
line 334, in _exec
result = self.pt_
File
"/usr/lib64/
line 431, in pt_render
result = PageTemplate.
File
"/usr/lib64/
line 79, in pt_render
showtal=
File "/usr/lib64/
line 131, in pt_render
File "/usr/lib64/
line 240, in __call__
File "/usr/lib64/
266, in __call__
File "/usr/lib64/
338, in interpret
s = s[:76] + "...\n"
File "/usr/lib64/
862, in do_useMacro
def do_useMacro(self, (macroName, macroExpr, compiledSlots, block),
File "/usr/lib64/
evaluate
return expression(self)
File "/usr/lib64/
217, in __call__
return self._eval(
File
"/usr/lib64/
line 147, in _eval
ob = self._subexprs[
File "/usr/lib64/
124, in _eval
ob = self._traverser(ob, element, econtext)
File
"/usr/lib64/
line 74, in boboAwareZopeTr
object = object.
File "/usr/lib64/
restrictedTraverse
File "/usr/lib64/
unrestrictedTra
NotFound: macros
After going back to zope.pagetemplate 3.5.2 all pages render correctly.
The issue has been discussed already on the Gentoo bug tracker:
https:/
Zope 2.13 supports zope.pagetemplate 3.5.x as expressed in its known good version set.
zope.pagetemplate 3.6.1 is currently only compatible with the yet unreleased Zope 4.0. Some unreleased changes on zope.pagetemplate trunk (to be released in 3.6.2) will likely make it backwards compatible. Even though the use of the 3.6.x line with Zope 2.13 isn't and won't be supported.