[ZCM] [ZC] 2302/ 3 Comment ""default" keyword behaves like "nothing" with tal:replace in 2.10"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 14 May 2007 04:04:17 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2302 Update (Comment) ""default" keyword behaves like "nothing" with tal:replace in 2.10"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2302

==============================================================
= Comment - Entry #3 by philikon on May 14, 2007 4:04 am

If it used to work in Zope 2.9 and no longer does in Zope 2.10, it's a Zope 2 BBB foul and belongs here.
________________________________________
= Comment - Entry #2 by ajung on May 11, 2007 12:37 pm

I think this belongs into the Zope 3 tracker since it's the Zope 3 ZPT engine
________________________________________
= Request - Entry #1 by betabug on Mar 29, 2007 3:39 am


Uploaded:  "default_replace_test.patch"
 - http://www.zope.org/Collectors/Zope/2302/default_replace_test.patch/view
In a tag that uses something like tal:replace="context/notexistant|default" the default keyword is treated like the "nothing" keyword, i.e. the tag in question is not in the resulting source.

**** My testcase (in a blank ZPT):

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="structure here/notexists|default" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="structure default" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="default" />]

**** Expected behaviour:
In 2.9 these render to 3 little zpt.gif icons in []. Rendered source:

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

**** What I got:
In 2.10.3 this renders to the following html source:

[]

[]

[]


Please see attached diff for a test to reproduce the matter.
==============================================================