a tal:on-error can disable subsequent slots in a macro
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Medium
|
Unassigned |
Bug Description
When a macro is defined which contains a tal:on-error, and that tal:on-error contains a metal:use-macro whose macro generates an exception, any subsequent slots in the original macro (outside of the tal:on-error) will not be filled. Though unusual and seemingly unlikely to be triggered, this bug has a major impact on plone 2.1 at the moment, so I'm marking it as critical.
I've attached a file containing a minimal set of templates which demonstrate the bug. The zpt 'main_macro' defines the primary macro 'master', which uses a macro 'bad' from the template 'thebad' within a tal:on-error and also defines a slot outside of the tal:on-error called 'bad_slot'; 'macro_user' calls the 'master' macro from 'main_macro' and attempts to fill the slot 'bad_slot'. When viewing 'macro_user' the slot will not be filled, if the 'bad' macro is changed so that it does not cause an error, the slot is filled as expected.
If the tal:on-error is placed within the 'bad' macro, everything works properly; unfortunately, doing so is not always a possibility.
Changes: submitter email, importance (critical => medium)