Error after updating to latest version.

Phoca Gallery - image gallery extension
kono_kun
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 21 Nov 2017, 07:14

Error after updating to latest version.

Post by kono_kun »

Old: Phoca Gallery — 4.0.0 beta, Phoca Gallery Plugin — 3.0.1
New: 4.3.6, 4.3.4

Error happens in frontend, when trying to display any gallery, regardless of settings.
modal.css is loaded, modal.js isn't.

Code: Select all

photo.html:48 Uncaught ReferenceError: SqueezeBox is not defined
at HTMLDocument.<anonymous> (photo.html:48)
at fire (jquery-1.9.1.js:1037)
at Object.fireWith [as resolveWith] (jquery-1.9.1.js:1148)
at Function.ready (jquery-1.9.1.js:433)
at HTMLDocument.completed (jquery-1.9.1.js:103)
photo.html.48

Code: Select all

<script type="text/javascript">
	jQuery(function($) {
		SqueezeBox.initialize({});
		SqueezeBox.assign($('a.pg-modal-button').get(), {
			parse: 'rel'
		});
	});
	window.jModalClose = function () {
		SqueezeBox.close();
	};
	
	// Add extra modal close functionality for tinyMCE-based editors
	document.onreadystatechange = function () {
		if (document.readyState == 'interactive' && typeof tinyMCE != 'undefined' && tinyMCE)
		{
			if (typeof window.jModalClose_no_tinyMCE === 'undefined')
			{	
				window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function'  ?  jModalClose  :  false;
				
				jModalClose = function () {
					if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
					tinyMCE.activeEditor.windowManager.close();
				};
			}
	
			if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
			{
				if (typeof(SqueezeBox) == 'undefined')  SqueezeBox = {};
				window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function'  ?  SqueezeBox.close  :  false;
	
				SqueezeBox.close = function () {
					if (window.SqueezeBoxClose_no_tinyMCE)  window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
					tinyMCE.activeEditor.windowManager.close();
				};
			}
		}
	};
</script>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after updating to latest version.

Post by Jan »

Hi, are you sure this javascript is rendered by Phoca Gallery? Which detail window method do you use? What does happen when you change to other detail window method?

Jan
If you find Phoca extensions useful, please support the project
kono_kun
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 21 Nov 2017, 07:14

Re: Error after updating to latest version.

Post by kono_kun »

Jan wrote: 26 Nov 2017, 15:00 Hi, are you sure this javascript is rendered by Phoca Gallery? Which detail window method do you use? What does happen when you change to other detail window method?

Jan
Yes. I uninstall the old version of Phoca Gallery, Editor Button and Gallery Plugin, install the latest version, add a gallery and try to display it somewhere with the plugin. The gallery plugin appears to work just fine, but the error breaks everything else on the site. Uninstalling the Gallery Plugin or browsing to a page without a gallery completely removes the SqueezeBox JS from the HTML. The detail method doesn't affect anything.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after updating to latest version.

Post by Jan »

Hi, even you set e.g. "No popup" or "Standard javascript popup" - both should not load any javascript library so there should not be any error produced by the popup methods :idea:

Jan
If you find Phoca extensions useful, please support the project
kono_kun
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 21 Nov 2017, 07:14

Re: Error after updating to latest version.

Post by kono_kun »

Jan wrote: 27 Nov 2017, 20:25 Hi, even you set e.g. "No popup" or "Standard javascript popup" - both should not load any javascript library so there should not be any error produced by the popup methods :idea:

Jan
Yes, even when setting to those 2 detail modes the error persists. The detail view works just fine, mind you. It's that the error-triggering JS gets into the page with the gallery plugin.
Post Reply