Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Working Gallery Plugin for SS 3


Go to End


106 Posts   30343 Views

Avatar
mhdesign

Community Member, 216 Posts

15 July 2013 at 9:19am

Edited: 15/07/2013 9:19am

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!!

Avatar
mhdesign

Community Member, 216 Posts

11 October 2013 at 4:29pm

Edited: 11/10/2013 4:29pm

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?

Avatar
Optic Blaze

Community Member, 190 Posts

11 October 2013 at 7:40pm

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?

Avatar
mhdesign

Community Member, 216 Posts

11 October 2013 at 9:44pm

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!

Avatar
Optic Blaze

Community Member, 190 Posts

11 October 2013 at 10:06pm

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

Avatar
mhdesign

Community Member, 216 Posts

12 October 2013 at 7:15am

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...

Avatar
mhdesign

Community Member, 216 Posts

12 October 2013 at 8:39am

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?

Avatar
mhdesign

Community Member, 216 Posts

12 October 2013 at 8:47am

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?