Tales Expression breakage in lates Zope 2.12.26 and 2.13.

Bug #1076316 reported by Andreas Elvers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Undecided
Unassigned
zope.tales
Invalid
Undecided
Unassigned

Bug Description

The following Tales expression used to compile under Zope 2.12.20 and also on earlier version of 2.13.

Enter this in ZMI into a page template:

  <span tal:replace="string:${options/blah|string:foo}"></span>

With 2.12.26 and 2.13.19 an error is thrown upon saving.

Compilation failed
zope.tal.taldefs.TALError: $ must be doubled or followed by a simple path in expression u'string:${options/blah|string:foo}', at line 8, column 3

Tags: tales
Revision history for this message
Andreas Elvers (itsafire1) wrote :

The current workaround is to write something like this:

<span tal:condition="exists:options/blah" tal:replace="string:${options/blah}"></span>
<span tal:condition="not:exists:options/blah" tal:replace="string:foo"></span>

Revision history for this message
Hanno Schlichting (hannosch) wrote :

This is the result of a bugfix (https://bugs.launchpad.net/zope.tales/+bug/1002242) and the former behavior was deemed to violate the specification. You have to change your templates.

Changed in zope2:
status: New → Invalid
Changed in zope.tales:
status: New → 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.