Shindig
  1. Shindig
  2. SHINDIG-1744

Allow opensocial-data feature to be included as a dependency of other features

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Including opensocial-data as a dependency in another feature doesn't properly include it when the gadget renders:

      1) Create a new feature that includes opensocial-data as a dependency

      <?xml version="1.0"?>
      <feature>
      <name>my_super_feature</name>
      <dependency>opensocial-data</dependency>
      <gadget>
      <script src="my_super_feature.js"/>
      </gadget>
      </feature>

      2) Add the super feature to a gadget and use an opensocial-data tag:
      ...
      <Require feature="my_super_feature"/>
      ...
      ...
      <script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/markup">
      <os:OwnerRequest key="owner"/>
      <os:ViewerRequest key="viewer"/>
      </script>
      ...
      ...

      3) When the gadget renders, the text/os-data section is not parsed properly by shindig and is literally rendered in the gadget HTML

      From debugging I found the code of issue to be org.apache.shindig.gadgets.rewrite.PipelineDataGadgetRewriter#rewrite, line 61:
      if (!gadget.getViewFeatures().containsKey("opensocial-data"))

      A nice enhancement would be if this check could also parse through dependencies of the included features to search for opensocial-data.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Anthony Carlucci
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development