HttpRequest format="text" does not function
-------------------------------------------

                 Key: SHINDIG-1002
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1002
             Project: Shindig
          Issue Type: Bug
          Components: Java
            Reporter: Adam Winer
            Assignee: Adam Winer


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


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to