You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

1

Wednesday, June 12th 2013, 10:20am

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:

Source code

1
c;c++){var d=(this[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

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

2

Wednesday, June 12th 2013, 10:58am

Hi
It seems there was a conflict with MooTools which I have now disabled.

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

3

Thursday, June 13th 2013, 3:19pm

Hi

Unfortunately this issue has come back, it seems that it wasn't anything to do with MooTools.

4

Tuesday, June 18th 2013, 8:53am

Hi,

that would be extremely strange...
Sure that no other scripts are involved?

Can you please post a link where the problem can be seen and describe what need to be done to see it.

Best regards,
Klaus

  • "designsubway" started this thread

Posts: 40

Location: York, UK

Occupation: Graphic Designer

  • Send private message

5

Wednesday, June 19th 2013, 1:34pm

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.

6

Monday, March 17th 2014, 6:57pm

such problem

I have joomla site version 3.23 and Krpano version 1.16.9
c;c++){var d=(this[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[c];}}return b;}" unique="function (){return[].combine(this);}" shuffle="function (){for(var c=this.length;c&&--c;){var b=this[c],d=Math.floor(Math.random()*(c+1)); this[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?

7

Tuesday, March 18th 2014, 2:30pm

There must be some very very wrong on that html page when such happens and normally that should be not related to krpano.

Btw - that code there is not from any krpano script.

Best regards,
Klaus

8

Wednesday, July 30th 2014, 9:23am

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.
qwekaa has attached the following image:
  • mootools_methods.png

This post has been edited 1 times, last edit by "qwekaa" (Jul 30th 2014, 10:54am)


9

Wednesday, July 30th 2014, 12:04pm

Began to work with such amendments:

Source code

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


replace

Source code

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


___________________________________

Source code

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


replace

Source code

1
2
3
4
5
      	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)] + '" ';
                    	}


___________________________________

Source code

1
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

Source code

1
2
3
4
5
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;
                    	}

10

Wednesday, July 30th 2014, 9:13pm

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

11

Thursday, July 31st 2014, 3:49am

Thank you. Your solution is better.