tal:define broken for variable self-reference
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Chamelon Core |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Using cmf.pt in a Plone 4 buildout, when a template does 'define="body_macro context/
When I manually change the define in base_edit to "body_macro edit_macros/body | XXX_body_macro | base_macros/body;" and then change the tal:define in my template to "XXX_body_macro", then the tal:define in base_edit gets the right macro for "body_macro".
So it seems that Chameleon doesn't handle self-reference in tal:define assignments correctly.
I narrowed this down further. Variable self-reference actually only breaks when the self-reference is made in the second "else" ("|") clause in the expression. Attached is a patch adding test coverage that exposes this bug.