17 Replies Latest reply: Sep 19, 2017 2:21 PM by João Gonçalves RSS

    Sense Mashup - Invalid Visualization: Extension not found in server

    João Gonçalves

      Hello all! I have a issue with extensions using mashups in another server. Everything is working fine except the extensions. The extension shows "invalid visualization - The visualization not found in the server". When using by single-object, or the html is running in the SENSE server works fine, but i wanna put it fully embedded in my website. Can anyone help me please?error.png

      /*
      * Basic responsive mashup template
      * @owner Enter you name here (xxx)
      */
      /*
      *    Fill in host and port for Qlik engine
      */
      /*var prefix = window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 );
      var config = {
          host: window.location.hostname,
          prefix: prefix,
          port: window.location.port,
          isSecure: window.location.protocol === "https:"
      };
      require.config( {
          baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
      } );
      */
      
      var prefix = window.location.pathname.substr(0, window.location.pathname.toLowerCase().lastIndexOf("/extensions") + 1);
      
      
      var config = {
          //host: window.location.hostname,
          host: "[SERVER]",
          //prefix: prefix,
          prefix: "/webticketos/",
          port: window.location.port,
          isSecure: true
      };
      //require.config({
      //baseUrl: (config.isSecure ? "https://" : "http://") + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
      //  baseUrl: "https://[SERVER]:443/webticketos/resources"
      //});
      
      requirejs.config({
          config: {
              text: { useXhr: function(url, protocol, hostname, port) { return true; } }
          },
          baseUrl: "https://[SERVER]:443/webticketos/resources"
      });
      
      define("client.services/grid-service", {});
      require(["js/qlik"], function(qlik) {
          qlik.setOnError(function(error) {
              $('#popupText').append(error.message + "<br>");
              $('#popup').fadeIn(1000);
          });
          $("#closePopup").click(function() {
              $('#popup').hide();
          });
      
          //callbacks -- inserted here --
          //open apps -- inserted here --
          var app = qlik.openApp('bb029934-f1c6-490f-8b47-b171eb44c558', config);
      
          //get objects -- inserted here --
      
          //create cubes and lists -- inserted here --
          app.getObject('QV01', 'LeWNjh');
          app.getObject('QV02', 'sXJCWE');
          app.getObject('QV03', 'VCdLwFn');
          app.getObject('QV04', 'hReQpJs');
          app.getObject('QV05', 'LHhjdFT');
          app.getObject('QV06', 'ZrApPL');
      
          //get objects -- inserted here --
      
      
      
      
      });