JSPWiki
  1. JSPWiki
  2. JSPWIKI-395

Unbalanced tags in default template

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8
    • Component/s: Default template
    • Labels:
      None
    • Environment:

      All

      Description

      Dirk –

      I've written a tool for JSPWiki 3.x that parses JSPs and tries to migrate them to a Stripes-compatible format. The tool works pretty well now, and among other things detects unbalanced tags. I've found 6 files in the default template that have errors. They are:

      • AttachmentTab.jsp – line 49: </wiki:Permission> should move after line 51: </form>
      • EditTemplate.jsp – lines 28 and 28 should be restructured; see below
      • InfoContent.jsp – line 141: <input> needs a trailing / to finish the tag
      • admin/UserManagement.jsp – line 114: needs a closing </tr>. Also, line 121: </div> should move after line 123
      • editors/FCK.jsp – line 130: </td> tag after <label> should be removed. Also, line 132: double quote (") immediately before closing /> should be removed.
      • editors/plain.jsp – line 196: </td> tag after <label> should be removed. Also, line 216: last </div> should be removed.

      Now, this is what I think should be done. Can you confirm that this is correct before we (you, I guess) commits?

        Activity

        Hide
        Andrew Jaquith added a comment -

        Oh, and for EditTemplate, here's how I'd recommend redoing it:

        Change this:

        <wiki:CheckRequestContext context="edit"><body class="edit" ></wiki:CheckRequestContext>
        <wiki:CheckRequestContext context="comment"><body class="comment" ></wiki:CheckRequestContext>

        to this:

        <body
        <wiki:CheckRequestContext context="edit">class="edit"</wiki:CheckRequestContext>
        <wiki:CheckRequestContext context="comment">class="comment"</wiki:CheckRequestContext>
        >

        Show
        Andrew Jaquith added a comment - Oh, and for EditTemplate, here's how I'd recommend redoing it: Change this: <wiki:CheckRequestContext context="edit"><body class="edit" ></wiki:CheckRequestContext> <wiki:CheckRequestContext context="comment"><body class="comment" ></wiki:CheckRequestContext> to this: <body <wiki:CheckRequestContext context="edit">class="edit"</wiki:CheckRequestContext> <wiki:CheckRequestContext context="comment">class="comment"</wiki:CheckRequestContext> >
        Hide
        Janne Jalkanen added a comment -

        I'd like to propose this for 3.0 instead of 2.8 - this only concerns the Stripes stuff, and we shouldn't change anything in the trunk now until 2.8 is released (unless it's a real bug affecting the 2.8 release).

        Show
        Janne Jalkanen added a comment - I'd like to propose this for 3.0 instead of 2.8 - this only concerns the Stripes stuff, and we shouldn't change anything in the trunk now until 2.8 is released (unless it's a real bug affecting the 2.8 release).
        Hide
        Andrew Jaquith added a comment -

        Depends on whether XHTML compliance is a goal for 2.8. If it is, we should make these fixes. This gets us closer...

        In that respect, I do consider this a bug.

        Show
        Andrew Jaquith added a comment - Depends on whether XHTML compliance is a goal for 2.8. If it is, we should make these fixes. This gets us closer... In that respect, I do consider this a bug.
        Hide
        Janne Jalkanen added a comment -

        The end result should be XHTML compliant; not the JSPs (e.g. the scriptlets automatically cause the template files not to be valid XML data anyway).

        Can you add a patch, please? Much easier to review...

        Show
        Janne Jalkanen added a comment - The end result should be XHTML compliant; not the JSPs (e.g. the scriptlets automatically cause the template files not to be valid XML data anyway). Can you add a patch, please? Much easier to review...
        Hide
        brushed added a comment -

        I think also this is useful to still take this in 2.8, as it are minor changes. If ok, i'll commit this very soon.

        No need for a patch, the description is pretty clear – txs Andrew.

        dirk

        Show
        brushed added a comment - I think also this is useful to still take this in 2.8, as it are minor changes. If ok, i'll commit this very soon. No need for a patch, the description is pretty clear – txs Andrew. dirk
        Hide
        brushed added a comment -

        Fixed in v2.8.0-beta-17.

        Show
        brushed added a comment - Fixed in v2.8.0-beta-17.
        Hide
        Andrew Jaquith added a comment -

        Dirk, great job except for templates/default/editors/plain.jsp. The </div> at the end of the file should come out.

        Show
        Andrew Jaquith added a comment - Dirk, great job except for templates/default/editors/plain.jsp. The </div> at the end of the file should come out.
        Hide
        brushed added a comment -

        This one was more difficult to crack

        <div id="sneakpreview" /></div>

        was replaced by

        <div id="sneakpreview" ></div>

        Solved in v2.8.0-beta-18.

        Show
        brushed added a comment - This one was more difficult to crack <div id="sneakpreview" /></div> was replaced by <div id="sneakpreview" ></div> Solved in v2.8.0-beta-18.
        Hide
        Andrew Jaquith added a comment -

        Dirk – thanks. That solved the issue.

        Show
        Andrew Jaquith added a comment - Dirk – thanks. That solved the issue.

          People

          • Assignee:
            brushed
            Reporter:
            Andrew Jaquith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.25h
              0.25h
              Remaining:
              Remaining Estimate - 0.25h
              0.25h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development