Uncaught ReferenceError: pgBXJQ is not defined

Phoca Gallery - image gallery extension
neillsun
Phoca Member
Phoca Member
Posts: 10
Joined: 23 Nov 2014, 22:59

Uncaught ReferenceError: pgBXJQ is not defined

Post by neillsun »

I had the Phoca Gallery working nicely with the boxslider module, and after updating a different module I now get the pgBXJQ not defined error in the console (using Chrome).

I have tried changing jQuery versions, but I just succeed in losing other modules and getting more errors with anything other that v1.8 or v1.7.

I have uninstalled Phoca Gallery component and boxslider modules and reinstalled them, but same result. I haven't tried uninstalling and deleting the folders and db tables and then reinstalling and recreating / importing from backup.

Does anyone have any suggestions for me?

Thanks,
Neill.

Tags:
neillsun
Phoca Member
Phoca Member
Posts: 10
Joined: 23 Nov 2014, 22:59

Re: Uncaught ReferenceError: pgBXJQ is not defined

Post by neillsun »

To add a bit more info: This is from my site's index.php files (using Chrome Inspect panel):

Code: Select all

pgBXJQ(document).ready(function(){
  pgBXJQ('.pgbx-bxslider').show().bxSlider({
	auto: true, pager: false, speed: 1500, controls: false,  easing: 'easeInBounce'
 });
});
And this is from the mod_phocagallery_slideshow_bxslider.php file:

Code: Select all

$js = 'var pgBXJQ =  jQuery.noConflict();';
	$js .= 'pgBXJQ(document).ready(function(){
  pgBXJQ(\'.pgbx-bxslider\').show().bxSlider({
	'.htmlspecialchars($s['params']).'
 });
});'. "\n";
So, looks like I've lost the pgBXJQ var definition for some reason.
neillsun
Phoca Member
Phoca Member
Posts: 10
Joined: 23 Nov 2014, 22:59

Re: Uncaught ReferenceError: pgBXJQ is not defined

Post by neillsun »

Found the issue. the jQuery issue was affecting more than one module, so the easy fix for this was to install the jQuery Easy plugin to override the individual modules that include jQuery and manage things in one place. It worked well and all but my Phoca Gallery sliderbox module reappeared. I was stuck with the error I mentioned above.

After much searching, experimenting and hair-pulling, I stumbled across an innocuous little setting in jQuery Easy, called 'Strip No Conflict Code'. Turned it off and BINGO! Everything working properly once again.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Uncaught ReferenceError: pgBXJQ is not defined

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply