[ZCM] [ZC] 1865/ 1 Request "a tal:on-error can disable subsequent slots in a macro"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Aug 12 18:58:08 EDT 2005


Issue #1865 Update (Request) "a tal:on-error can disable subsequent slots in a macro"
 Status Pending, Zope/bug critical
To followup, visit:
  http://www.zope.org/Collectors/Zope/1865

==============================================================
= Request - Entry #1 by alecm on Aug 12, 2005 6:58 pm


Uploaded:  "zpt_error.txt"
 - http://www.zope.org/Collectors/Zope/1865/zpt_error.txt/view
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.
==============================================================



More information about the Zope-Collector-Monitor mailing list