[ZCM] [ZC] 2223/ 5 Resubmit "tal:attribute test forward porting"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Jan 8 08:06:00 EST 2007


Issue #2223 Update (Resubmit) "tal:attribute test forward porting"
 Status Accepted, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2223

==============================================================
= Resubmit - Entry #5 by philikon on Jan 8, 2007 8:05 am

 Status: Rejected => Accepted

After talking to Wichert again, we came to the conclusion that too many templates out there depend on the (IMO broken) behaviour of Zope 2. So it'd be best to forward port that brokenness to Zope 2.10+.

Renamed Wichert's original test case in Zope 2.9 to a more sensible name in r71797.
________________________________________
= Edit - Entry #4 by philikon on Jan 8, 2007 7:35 am

 Changes: submitter email, edited transcript
________________________________________
= Reject - Entry #3 by philikon on Jan 8, 2007 7:34 am

 Status: Accepted => Rejected

The test that was added tries the following::

  <p tal:attributes="disabled python:True and default or 'disabled'"></p>
  <p tal:attributes="disabled python:False and default or 'disabled'"></p>

and expects the following output::

  <p></p>
  <p disabled="disabled"></p>

This test is a bit bogus as 'disabled' is one of those HTML "boolean" attributes (like 'selected' in '<option selected="selected">'). The test should read:

  <p tal:attributes="disabled python:False"></p>
  <p tal:attributes="disabled python:True"></p>

(of course, True and False would be actual expressions that return True or False). The TAL interpreter figures out the rest.

So, whichever backward compatibility problem Zope 2.10 introduced, it's really a problem of improper usage of the 'disabled' attribute and should be fixed in whichever software (Plone 3?) that makes use of this feature.

Note that everything works as expected for "normal", non-boolean attributes.

I'm going to back out the test again.
________________________________________
= Assign - Entry #2 by philikon on Oct 28, 2006 2:42 pm

 Status: Pending => Accepted

 Supporters added: philikon

 
________________________________________
= Request - Entry #1 by wichert on Oct 26, 2006 1:31 pm

I added a unittest for tal:attribute conditional handling to the 2.9 branch in changeset 70918. This needs to be forward ported to 2.10 and trunk, which currently fail the test.
==============================================================



More information about the Zope-Collector-Monitor mailing list