Tapestry 5
  1. Tapestry 5
  2. TAP5-622

Client ids should not contain the ':' character, as that can confuse WebKit-based browsers

    Details

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

      Description

      When attempting to perform a partial page reload such as an AJAX zone, using a WebKit based browser, (such as Chrome or Safari) you will see the following error if the section of the DOM to be updated contains Element IDs with colons in them:

      SYNTAX ERROR - DOM EXCEPTION 12

      Typically, the colons in the IDs are a result of Tapestry dynamically generating an ID for the element, although I'm not suggesting the colon is removed.

      The problem seems to be caused by something in Prototype. I couldn't tell you exactly what, although this forum messages gives details of a similar problem encountered by another user:

      https://prototype.lighthouseapp.com/projects/8886/tickets/497-prototype-v1603-elementselect-works-wrong-under-safari-and-chrome

      The latest version of Prototype (1.6.1 RC2) fixes the problem. Although I understand you may not be too keen to use a release candidate version of a library in Tapestry, once Prototype 1.6.1 is released, could this be placed into Tapestry 5.1 ?

        Issue Links

          Activity

          Hide
          Howard M. Lewis Ship added a comment -

          The use of colons in client ids is problematic in and of itself. Perhaps we should switch to underscores? The goal was to select a character that would allow "related" client ids to be generated easily on the server or the client, without fear of conflict with other generated ids, and colons are not allowed as component ids, and therefore won't ever be part of a generated id. However, using a dash ('-') may work better.

          Show
          Howard M. Lewis Ship added a comment - The use of colons in client ids is problematic in and of itself. Perhaps we should switch to underscores? The goal was to select a character that would allow "related" client ids to be generated easily on the server or the client, without fear of conflict with other generated ids, and colons are not allowed as component ids, and therefore won't ever be part of a generated id. However, using a dash ('-') may work better.
          Hide
          Scott mcCarthy added a comment -

          Hi Howard,

          Changing the colons to underscores (or some other acceptable character) should fix the problem as well, and remove our dependency on the Prototype update. (Although I'm sure there are some other goodies in there worth having, although not relevant to this bug).

          In short, as long as I can get my application to work in WebKit browsers, I'm happy!

          Cheers

          Scott

          Show
          Scott mcCarthy added a comment - Hi Howard, Changing the colons to underscores (or some other acceptable character) should fix the problem as well, and remove our dependency on the Prototype update. (Although I'm sure there are some other goodies in there worth having, although not relevant to this bug). In short, as long as I can get my application to work in WebKit browsers, I'm happy! Cheers Scott
          Hide
          Howard M. Lewis Ship added a comment -

          You could also do some work to patch the version of Prototype; there are configuration symbols that let you control where (in the classpath or context) the protoype/scriptaculous files are located.

          Show
          Howard M. Lewis Ship added a comment - You could also do some work to patch the version of Prototype; there are configuration symbols that let you control where (in the classpath or context) the protoype/scriptaculous files are located.

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Scott mcCarthy
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development