Code appearing after upgrade

  • Hi
    I have just used the update tool to upgrade a 1.0.8.15 pano to 1.16.4 (swfkrpano.js and pano.swf).
    The problem is that I now have some extra code displaying on the page underneath the pano:

    Code
    c;c++){var d=(this[code=c]-0).toString(16);a.push(1==d.length?"0"+d:d)}return b?a:"#"+a.join("")}" />

    If I revert back to the old swfkrpano.js file then this disappears. You can view it at http://www.scarborough360.co.uk

  • Hi Klaus

    The site is a Joomla site. I have found that if I turn off the cache then this code no longer appears. This is fine but it does mean that pages load a little slower.

    The problem is that before I upgraded the panos on the site the cache was also turned on and this code didn't appear. It is being added by javascript because if I look at the page source it isn't there (it's phantom code).

    You can go to http://www.scarborough360.co.uk but the code is not appearing now because I have turned off the cache.

  • I have joomla site version 3.23 and Krpano version 1.16.9
    c;c++){var d=(this[code=c]-0).toString(16);a.push(1==d.length?"0"+d:d)}return b?a:"#"+a.join("")}" min="function (){return Math.min.apply(null,this); }" max="function (){return Math.max.apply(null,this);}" average="function (){return this.length?this.sum()/this.length:0;}" sum="function (){var b=0,c=this.length; if(c){while(c--){b+=this[code=c];}}return b;}" unique="function (){return[].combine(this);}" shuffle="function (){for(var c=this.length;c&&--c;){var b=this[code=c],d=Math.floor(Math.random()*(c+1)); this[code=c]=this[d];this[d]=b;}return this;}" rgbToHsb="function (){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0; if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k)/l;if(c==j){h=m-b;}else{if(d==j){h=2+e-m;}else{h=4+b-e;}}h/=6;if(h<0){h++;}}return[Math.round(h*360),Math.round(g*100),Math.round(i*100)]; }" hsbToRgb="function (){var d=Math.round(this[2]/100*255);if(this[1]==0){return[d,d,d];}else{var b=this[0]%360;var g=b%60;var h=Math.round((this[2]*(100-this[1]))/10000*255); var e=Math.round((this[2]*(6000-this[1]*g))/600000*255);var c=Math.round((this[2]*(6000-this[1]*(60-g)))/600000*255);switch(Math.floor(b/60)){case 0:return[d,c,h]; case 1:return[e,d,h];case 2:return[h,d,c];case 3:return[h,e,d];case 4:return[c,h,d];case 5:return[d,h,e];}}return false;}" />


    Where can I download the old version 1.08.15? Or how to fix this error?

  • The same problem as described by the author in the first message. (CMS Joomla! 3.3.1, Mootools 1.4.5, krpano Embedding Script krpano 1.17.4)

    This conflict mootools and function createPanoViewer.

    The problem starts in the cycle after the line o = '<embed name = "' + h + '"' + u + 'type = "application / x-shockwave-flash" src = "' + e.swf + '"';

    How to solve this problem?

    Begins even earlier, when assigned values. That's what happens with the included mootools.

  • Began to work with such amendments:

    Code
    for(i in l)f!=""&&(f+="&"),f+=encodeURIComponent(i)+"="+encodeURIComponent(l[i]);

    replace

    Code
    for (i in l)
    {
    if (typeof c[i] !== 'function')
    f != "" && (f += "&"), f += encodeURIComponent(i) + "=" + encodeURIComponent(l[i]);
    }

    ___________________________________

    Code
    o='<embed name="'+h+'"'+u+'type="application/x-shockwave-flash" src="'+e.swf+'" ';for(i in c)o+=i+'="'+c+'" ';

    replace

    Code
    o = '<embed name="' + h + '"' + u + 'type="application/x-shockwave-flash" src="' + e.swf + '" ';
                        	for (i in c) {
                            	if (typeof c[i] !== 'function')
                                	o += String(i) + '="' + c[String(i)] + '" ';
                        	}

    ___________________________________

    Code
    o="<object"+u+'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="'+e.swf+it;for(i in c)o+='<param name="'+i+'" value="'+c[i]+it;

    replace

    Code
    o = "<object" + u + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="' + e.swf + it;
                        	for (i in c){
                            	if (typeof c[i] !== 'function')
                                	o += '<param name="' + String(i) + '" value="' + c[String(i)] + it;
                        	}
  • Hi,

    this is a known problem - Mootools and some other JS frameworks are extending the default Array type and this breaks 'for in' loops over Arrays and the current krpano embedding script is using this case (the krpano HTML5 viewer itself not).

    There would be an easier fix - search the embedding .js file for '[]' and replace it with '{}' (this should be occur 2 times).

    For the next krpano version this was already fixed.
    Attach here a copy of the new embedding script:
    embedpano.zip

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!