Shindig
  1. Shindig
  2. SHINDIG-1162

Problem while updating a dataset and re-rendering a template

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Javascript
    • Labels:
      None
    • Environment:
      PHP Shindig (rev 810159)

      Description

      Here is an example gadget : http://pastebin.ca/1550608

      After the first dataset update / template processing :

      • A number (debug?) is prepended to the $ {test} variable in the output

        After the second dataset update / template processing :
        - The number is still there, incremented
        - The <h1></h1> block surrounding the ${test}

        variable has been removed

      1. test-1162.xml
        0.8 kB
        Matthieu Huguet

        Activity

        Matthieu Huguet created issue -
        Hide
        Paul Lindner added a comment -

        can yuo put the example in the bug? pastebin.ca link is now invalid.

        Thanks!

        Show
        Paul Lindner added a comment - can yuo put the example in the bug? pastebin.ca link is now invalid. Thanks!
        Hide
        Matthieu Huguet added a comment -

        here it is

        Show
        Matthieu Huguet added a comment - here it is
        Matthieu Huguet made changes -
        Field Original Value New Value
        Attachment test-1162.xml [ 12425141 ]
        Hide
        Eric Barmeyer added a comment -

        Stumbled over a very similar error when I tried to render one of my templates:

        <div id="test"></div>
        <script type="text/os-template" tag="foo:bar">
        $

        {data}

        </script>
        <script type="text/javascript">
        function init() {
        var template = opensocial.template.getTemplate("foo:bar");
        template.renderInto(document.getElementById("test"),

        { data : "Hello World!" }

        );
        }
        gadgets.util.registerOnLoadHandler(init);

        This results in "1Hello World!" instead of just "Hello World!".

        My current fix for this is to turn off the javascript compression in the config file. Couldn't figure out yet why this happen or how to fix it. Could this be a bug in the javascript compressor?

        Show
        Eric Barmeyer added a comment - Stumbled over a very similar error when I tried to render one of my templates: <div id="test"></div> <script type="text/os-template" tag="foo:bar"> $ {data} </script> <script type="text/javascript"> function init() { var template = opensocial.template.getTemplate("foo:bar"); template.renderInto(document.getElementById("test"), { data : "Hello World!" } ); } gadgets.util.registerOnLoadHandler(init); This results in "1Hello World!" instead of just "Hello World!". My current fix for this is to turn off the javascript compression in the config file. Couldn't figure out yet why this happen or how to fix it. Could this be a bug in the javascript compressor?
        Gavin made changes -
        Workflow jira [ 12474678 ] patch-available, re-open possible [ 12629542 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Matthieu Huguet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development