Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
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