a tal:on-error can disable subsequent slots in a macro

Bug #143485 reported by Alec Mitchell
2
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.

Tags: bug zope
Revision history for this message
Alec Mitchell (alecm) wrote :
Revision history for this message
Andreas Jung (ajung) wrote :

Changes: submitter email, importance (critical => medium)

Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

Confirmed on Zope 2.12.8dev

Changed in zope2:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.