Shindig
  1. Shindig
  2. SHINDIG-1706

Internet Explorer does not render <script> tags inside templates (<Template>)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta1
    • Fix Version/s: 2.5.0-beta1
    • Component/s: Javascript
    • Labels:
      None
    • Environment:
      Windows Vista, Internet Explorer 8

      Description

      Internet Explorer does not render <script> tags inside templates (<Template>).

      Example:
      ...
      <Template>
      ...
      <script type="text/javascript">
      // some javascript here
      </script>
      </Template>
      ...

      Seems like it has been fixed 2.0.2 (SHINDIG-1412, revision 999892), but still occurs in 3.0.0-beta2. It fails with the following exception:

      LOG: jsexec EXCEPTION: [object Error] at [object] with function anonymous(a_, b_)

      { with (a_) with (b_) return os.doTag(this, "...", "...", $this, $context) }
      1. SHINDIG-1706.patch
        0.7 kB
        Richard Kettelerij

        Issue Links

          Activity

          Paul Lindner made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Paul Lindner added a comment -

          part of 2.5.0-beta1 release.

          Show
          Paul Lindner added a comment - part of 2.5.0-beta1 release.
          Henry Saputra made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.5.0 [ 12315324 ]
          Resolution Fixed [ 1 ]
          Hide
          Henry Saputra added a comment -

          Committed revision 1298249.

          Show
          Henry Saputra added a comment - Committed revision 1298249.
          Hide
          Henry Saputra added a comment -

          Yeah I guess it could be done via separate JIRA. If there is no objection I could apply the patch EOD today.

          Show
          Henry Saputra added a comment - Yeah I guess it could be done via separate JIRA. If there is no objection I could apply the patch EOD today.
          Hide
          Rein Krul added a comment -

          +1

          Show
          Rein Krul added a comment - +1
          Hide
          Richard Kettelerij added a comment -

          There is one limitation to this patch, or in fact the whole opensocial-templates feature: you can't use template variables ($

          {foo}

          ) inside <script> tags that are embedded in templates (<Templates>). Granted, it's a corner case issue. However it currently works for non-IE browsers (Chrome/FF) but not in IE. Once you apply this patch it doesn't work in IE as wel as non-IE browsers.

          We believe this is for the better since it's overall more consistent. Having parts of a feature working properly in one browser but not in another is confusing. We did try to make templating in embedded script tags work but (unfortunately) didn't find a proper solution.

          Show
          Richard Kettelerij added a comment - There is one limitation to this patch, or in fact the whole opensocial-templates feature: you can't use template variables ($ {foo} ) inside <script> tags that are embedded in templates (<Templates>). Granted, it's a corner case issue. However it currently works for non-IE browsers (Chrome/FF) but not in IE. Once you apply this patch it doesn't work in IE as wel as non-IE browsers. We believe this is for the better since it's overall more consistent. Having parts of a feature working properly in one browser but not in another is confusing. We did try to make templating in embedded script tags work but (unfortunately) didn't find a proper solution.
          Hide
          Henry Saputra added a comment -

          +1

          Show
          Henry Saputra added a comment - +1
          Richard Kettelerij made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Richard Kettelerij added a comment -

          We've found the issue. See attached patch for the fix.

          As stated earlier SHINDIG-1412 was supposed to fix this issue but it missed an 'else' statement so it didn't work. After (intensive) debugging we've spotted the error, it's a matter of a missing else statement.

          Show
          Richard Kettelerij added a comment - We've found the issue. See attached patch for the fix. As stated earlier SHINDIG-1412 was supposed to fix this issue but it missed an 'else' statement so it didn't work. After (intensive) debugging we've spotted the error, it's a matter of a missing else statement.
          Richard Kettelerij made changes -
          Attachment SHINDIG-1706.patch [ 12517072 ]
          Rein Krul made changes -
          Field Original Value New Value
          Link This issue is related to SHINDIG-1412 [ SHINDIG-1412 ]
          Rein Krul created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Rein Krul
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development