Tapestry 5
  1. Tapestry 5
  2. TAP5-333

Tapestry 5 renders an XHTML label element incorrectly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.16
    • Fix Version/s: 5.0.16
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      The Tapestry markup renderer renders an empty XHTML <label /> incorrectly, it encloses subsequent elements instead of closing immediately, example:

      This line of code:
      <label class="formLabel" /><t:textfield t:id="address2" value="site.address2" /><br/>

      Is rendering as:
      <label class="formLabel">
      <input id="address2" type="text" name="address2"/>
      <img id="address2:icon" class="t-error-icon" src="../../assets/5.0.16-SNAPSHOT/tapestry/spacer.gif" alt="" style="display: none;"/>
      <br/>
      </label>

      instead of:
      <label class="formLabel inlineBlock"/>
      <input id="address2" type="text" name="address2"/>
      <img id="address2:icon" class="t-error-icon" src="../../assets/5.0.16-SNAPSHOT/tapestry/spacer.gif" alt="" style="display: none;"/>
      <br/>

      It appears an empty tag or whitespace is not dealt with.

        Issue Links

          Activity

          Hide
          Peter Stavrinides added a comment -

          The <label /> appears to be rendering correctly now, but this issue seems to extend to other elements as well, I have seen it at least with: (<b /> and <a />). This bug must have been introduced recently as it does not appear in 5.0.14, but appears in 5.0.16... I have not tested 5.0.15.

          <b class="b1" /><b class="b2" /><b class="b3" /><b class="b4" />

          Firebug picks up the incorrect <b /> tag's markup as:
          <b class="b1">
          <b class="b2">
          <b class="b3">
          <b class="b4"/>
          </b>
          </b>
          </b>

          Show
          Peter Stavrinides added a comment - The <label /> appears to be rendering correctly now, but this issue seems to extend to other elements as well, I have seen it at least with: (<b /> and <a />). This bug must have been introduced recently as it does not appear in 5.0.14, but appears in 5.0.16... I have not tested 5.0.15. <b class="b1" /><b class="b2" /><b class="b3" /><b class="b4" /> Firebug picks up the incorrect <b /> tag's markup as: <b class="b1"> <b class="b2"> <b class="b3"> <b class="b4"/> </b> </b> </b>
          Hide
          Peter Stavrinides added a comment -

          It appears to have been fixed for the <label /> only, but the problem extends to other elements having the same behavior.

          Show
          Peter Stavrinides added a comment - It appears to have been fixed for the <label /> only, but the problem extends to other elements having the same behavior.
          Hide
          Howard M. Lewis Ship added a comment -

          The bug fix will occur in the cloned issue, as part of 5.1.

          Show
          Howard M. Lewis Ship added a comment - The bug fix will occur in the cloned issue, as part of 5.1.
          Hide
          Steven Woolley added a comment -

          Can I petition that the closing tags not being rendered also be fixed before 5.1? Not only did it cause invalid html, but also it actually affected the rendering (or at least the browser's attempt to compensate did) of visual layout (I had div's that were wrapped inside of the unclosed anchor above it at least in Safari!).

          Further, I saw some crazy errors also associated with it:

          RequestExceptionHandler Processing of request failed with uncaught exception: Request event 'gotoPage' (on component Playlist:table) was not handled; you must provide a matching event handler method in the component or in one of its containers.

          When the Handler WAS defined, in the table component. (it worked flawlessly before the upgrade and flawlessly after change all empty anchor's to have an empty span inside them) (I use $('gotolinkid'); to get the url of the link to update it with ajax) and the unmatched tags must have screwed that up too.

          It also affected empty <h1></h1>'s etc... I think this is a big regression that will give people a bad impression in a stable release.

          Furthermore, it affects the beandisplay component (if any of the fields to display are empty, I get unclosed tags, which I can't control without overriding the render block for that property!

          Please reconsider opening this back up and fixing it before 5.1!

          Show
          Steven Woolley added a comment - Can I petition that the closing tags not being rendered also be fixed before 5.1? Not only did it cause invalid html, but also it actually affected the rendering (or at least the browser's attempt to compensate did) of visual layout (I had div's that were wrapped inside of the unclosed anchor above it at least in Safari!). Further, I saw some crazy errors also associated with it: RequestExceptionHandler Processing of request failed with uncaught exception: Request event 'gotoPage' (on component Playlist:table) was not handled; you must provide a matching event handler method in the component or in one of its containers. When the Handler WAS defined, in the table component. (it worked flawlessly before the upgrade and flawlessly after change all empty anchor's to have an empty span inside them) (I use $('gotolinkid'); to get the url of the link to update it with ajax) and the unmatched tags must have screwed that up too. It also affected empty <h1></h1>'s etc... I think this is a big regression that will give people a bad impression in a stable release. Furthermore, it affects the beandisplay component (if any of the fields to display are empty, I get unclosed tags, which I can't control without overriding the render block for that property! Please reconsider opening this back up and fixing it before 5.1!

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Peter Stavrinides
            • Votes:
              6 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development