Actually wondered later last night if it might be a stray GalleryPage.ss or GalleryPage.php causing grief. You nailed it OpticBlaze!! Thanks for all you help with this!!
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Well, it WAS working. Just about to upload to live server and the PrettyPhoto lightbox broke! Instead of back/forward arrows and Social Media stuff I get an image on a black page. Firebug tells me:
TypeError: $(...).prettyPhoto is not a function
$("a[rel^='prettyPhoto']").prettyPhoto();
Anybody ever had this happen?
Hi,
Sounds like the pretty photo jquery.prettyPhoto.js file is not executing. Did you check that it is loaded and that there are no jquery conflicts?
Hi Optic Blaze! Yes, I can see prettyPhoto.js loaded and I was wondering if:
a) There was a conflict with another script; or
b) I needed lo load it sooner/later
Think what happened was it stopped working once I added a responsive function to the site -- unfortunately don't know of any potential conflict. I now see that I also have jquery.min.js and jquery-1.7.1min.js. Just turned off 1.7.1 but problem not resolved -- and it threw a couple more errors.
Will keep on looking. Thanks for the tip!
Sounds like you are on the right track:
Try commenting out this line in the SS3 gallery module located in the GalleryPage.php file:
//Requirements::javascript('ss3Gallery/js/jquery-1.7.1.min.js');
You responsive design's jquery version should then take over which would hopefully sort out the conflict
Thanks but that didn't do it...
Did generate a couple more errors though:
TypeError: Object.extend is not a function
}, window.LightboxOptions || {});
lightb...5125063 (line 63)
ReferenceError: Prototype is not defined
linear: Prototype.K,
effect...5125063 (line 73)
TypeError: $(...).prettyPhoto is not a function
$("a[rel^='prettyPhoto']").prettyPhoto();
... which doesn't mean a whole lot to me at this stage but I'll keep fiddling...
OK - I nailed the culprit:
<% require javascript(http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js) %>
This is part of the responsive design. It means on smaller devices the navigation panel folds away into a bar at the top of the screen until it's needed... now wondering what to do as a workaround?
OK. So the version of jquery I'm downloading is 1.9.1
The version included in SilverStripe (Third Party directory) is 1.7.2
I'm wondering if they are mutually exclusive?