Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1002

HttpRequest format="text" does not function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Java
    • None

    Description

      The following gadget:

      <?xml version="1.0" encoding="UTF-8"?>
      <Module>
      <ModulePrefs title="Server-side Template">
      <Require feature="opensocial-data" />
      <Require feature="opensocial-templates"/>
      </ModulePrefs>
      <Content type="html">
      <![CDATA[
      <script xmlns:os="http://ns.opensocial.org/2008/markup" type="text/os-data">
      <os:HttpRequest key="google" href="http://www.google.com" format="text"/>
      </script>

      <script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup">
      <os:Html code="${google}"/>
      </script>
      ]]>
      </Content>
      </Module>

      ... produces an exception:

      java.lang.RuntimeException: org.json.JSONException: JSONObject["data"] is not a JSONObject.
      at org.apache.shindig.gadgets.rewrite.PipelineDataContentRewriter.rewrite(PipelineDataContentRewriter.java:170)
      at org.apache.shindig.gadgets.rewrite.DefaultContentRewriterRegistry.rewriteGadget(DefaultContentRewriterRegistry.java:74)
      at org.apache.shindig.gadgets.render.HtmlRenderer.render(HtmlRenderer.java:86)
      at org.apache.shindig.gadgets.render.Renderer.render(Renderer.java:89)
      ...
      Caused by: org.json.JSONException: JSONObject["data"] is not a JSONObject.
      at org.json.JSONObject.getJSONObject(JSONObject.java:520)
      at org.apache.shindig.gadgets.rewrite.PipelineDataContentRewriter.rewrite(PipelineDataContentRewriter.java:162)
      ... 24 more

      Attachments

        Activity

          People

            adamwiner Adam Winer
            adamwiner Adam Winer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: