1 Reply Latest reply on Jun 11, 2015 10:22 AM by john.boloian@nuance.com

    In !app, ctx.jive.content.id is often -1


      I am building a !app that is Jive hosted. In Javascript, I try to make use of ctx.jive.content.id. It is often -1. Am I missing a step to getting the correct ID?


      if (ctx.jive.content && ctx.jive.content.type && ctx.jive.content.id) {
            alert(ctx.jive.content.id); // I will use it for context management


      The post's URL will be:



      And the content will show:




      I don't think this happens 100% of the time, but more often than not in my app.


      On the view's page, I have this code:

                gadgets.util.registerOnLoadHandler(function () {




                          id: "com.jivesoftware.panopto.bang", // Same action id from app.xml

                          callback: initVideoEmbed



      And in my JS I have this:


      function initVideoEmbed(ctx) {

          // Unrelated stuff...

          if (ctx.jive.content && ctx.jive.content.type && ctx.jive.content.id) {

              alert(ctx.jive.content.id); // Grab the context ID