0 Replies Latest reply on Apr 7, 2016 8:33 AM by nagendra1891

    Custom Recent Activity Plugin for JIVE 8.0.2.0

    nagendra1891

      Hey guys,

       

      I am developing a custom Activity plugin and facing this issue !!

       

      when i reference the   soy template with custom template entire instance breaks and SBS logs says "No content allowed between 'call' and 'param' (whitespace and comments are okay). Found on line 42"

       

      try 1 default activity soy template

      private static final String SOY_TEMPLATE = "jive.widget.recentactivity.soy";

       

      when i load my project i can see the widget in overview page but it does not renders the plugin !!

       

       

       

      try 2 : obtained the soy template from jive referenced in my java code

      private static final String SOY_TEMPLATE = "jive.widget.customrecentactivity.soy";

       

       

      error for both is the same but when i reference it to the custom soy template entire project breaks

       

      [-1:ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.theme.ThemeFilter - Could not process decorator '/template/decorator/default/template.ftl

      com.google.template.soy.base.SoySyntaxException: In file file:/Users/bushan/plugins/custom-recent-activity/target/custom-recent-activity/resources/templates/soy/custom_recent_activity_widget.soy, template jive.widget.customrecentactivity.soy.main: No content allowed between 'call' and 'param' (whitespace and comments are okay). Found on line 42

        at com.google.template.soy.base.SoySyntaxException.createCausedWithoutMetaInfo(SoySyntaxException.java:69)

        at com.google.template.soy.base.SoySyntaxException.createCausedWithMetaInfo(SoySyntaxException.java:112)

        at com.google.template.soy.soyparse.SoyFileParser.Template(SoyFileParser.java:312)

       

      Soy template :

       

       

       

      {namespace jive.widget.recentactivity.soy}

      /**

      * template for the recent activity widget.

      *

      * @param activityStream

      * @param activityStream4JS

      * @param streamType

      * @param objectType

      * @param objectID

      * @param size

      * @param preferredMode

      * @param startMode

      * @param mobileUI

      * @param isEditing

      * @param communityName

      * @param widgetID

      * @param hasImagePerms

      * @param filterData

      * @param? publishBarViewBean

      * @param? customTitle

      *

      * @depends path=/resources/scripts/apps/activity_stream/activity_stream_controller.js lazy=true

      * @depends i18nKeys=activity.empty.title

      * @depends i18nKeys=activity.empty.desc

      * @depends i18nKeys=widget.too_big

      *

      */

      {template .main}

       

          {if $size == 2} //large

              {if $publishBarViewBean}

            <div class="j-create-container" role="group" aria-label="{i18nText('global.create')}">

                    {if $activityStream.canCreateMbEntry and not $activityStream.viewingUser.anonymous}

                          <div id="activityPlacemoderation-container" style="display:none">

                              <div id="activityPlacemoderation-warning" class="jive-content-moderation-box"

                                  style="display:none">

                                  <span class="jive-icon-med jive-icon-warn"></span>{i18nText('mod.content.create')}

                              </div>

                          </div>

                          <div class="j-main-mb-entry" role="presentation">

                            {call jive.shared.soy.resourceInlineJs}

                                  {param code}

                                      require(['apps/microblogging/status_input_mb_controller'],

                                          function(MBController) {lb}

                                              new MBController({lb}

                                                  publishBarIdentifier: 'activityPlace',

                                                  publishBarViewBean: {buildJson($publishBarViewBean)|noAutoescape}

                                              {rb});

                                          {rb});

                                  {/param}

                              {/call}

                            {call jive.statusinput.containers.microbloggingStatusInput}

                                {param statusID:'mb-header-editor' /}

                                {param user:$activityStream.viewingUser /}

                                {param canCreateMbImage: $activityStream.canCreateMbImage /}

                                {param canCreateMbVideo: $activityStream.canCreateMbVideo /}

                                {param canCreateMbLinkPreview: $activityStream.canCreateMbLinkPreview /}

                                {param canAtMention: not $mobileUI /}

                                {param focusStatusUpdate: false /}

                                  {param publishBarViewBean: $publishBarViewBean /}

                                  {param publishBarIdentifier: 'activityPlace' /}

                            {/call}

                        </div>

                    {/if}

            </div>

              {/if}

              <div id="j-dynamic-pane" class="j-stream j-stream-container j-rc5">

                  {call jive.eae.activitystream.streamSpecificFilters}

                      {param streamDisplayName: ($customTitle ? $customTitle : '' ) /}

                      {param streamType: $streamType /}

                      {param filterData: $filterData /}

                      {param numUpdatesSinceRefresh: 0 /} // doesn't matter

                      {param extraCssClasses:

                          'jive-widget-header jive-act-widget-header j-rc4 j-rc-none-bottom jive-box-header' /}

                  {/call}

                  {call jive.shared.soy.resourceInlineJs}           line 42

                      {param code}

                          $j(function() {lb}

                              require(['apps/activity_stream/activity_stream_controller'], function(ASController) {lb}

                                  jive.RecentActivityWidgetController = new ASController({lb}

                                      contextObjectType: {$objectType},

                                      contextObjectID: {$objectID},

                                      streamType: '{$streamType}',

                                      streamID: '0',

                                      rteOptions: {lb}

                                          preferredMode:'{$preferredMode}',

                                          startMode:'{$startMode}',

                                          mobileUI:{$mobileUI},

                                          isEditing:{$isEditing},

                                          communityName:'{$communityName}',

                                          hasImagePerms:{$hasImagePerms}

                                      {rb},

                                      data:{buildJson($activityStream4JS)|noAutoescape},

                                      filterData: {buildJson($filterData)|noAutoescape},

                                      widgetID:'{$widgetID}',

                                      extraHeaderCssClasses:

                                          "jive-widget-header jive-act-widget-header j-rc4 j-rc-none-bottom jive-box-header",

                                      streamDisplayName: '{$customTitle}'

                                  {rb});

                              {rb});

                          {rb});

                      {/param}

                  {/call}

                  <div id="j-js-{$streamType}-{$widgetID}" class="j-act j-act-stream j-box-stream j-stream-list jive-widget-body

                      {if not $mobileUI} j-not-mobile{/if}">

                      <div id="previewable-binary-viewer"></div>

                      <div id="j-stream-item-list-{$widgetID}">

                          <div class="j-act-pagepoll clearfix" id="j-updates" role="status" style="display:none;"></div>

                          {call jive.eae.activitystream.activityStreamList}

                              {param activityStream: $activityStream /}

                              {param streamType: $streamType /}

                              {param filterData: $filterData /}

                              {param mobileUI: $mobileUI /}

                          {/call}

                      </div>

                  </div>

              </div>

          {else}

              <div class="j-widget-error jive-warn-box" aria-live="polite" aria-atomic="true">

                  <div>

                      <span class="jive-icon-med jive-icon-warn"></span>

                      {i18nText('widget.too_big')|escapeJs}

                  </div>

              </div>

          {/if}

      {/template}

       

       

       

       

       

      any help is appreciated!

       

      Regards

      Nagendra B