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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Lightbox not working


Go to End
Reply


9 Posts   5017 Views

Avatar
evangogh

Community Member, 4 Posts

8 July 2008 at 3:03am

I have installed the Gallery module but cannot get the lightbox to open. The gallery page is appearing correctly, however when I click on the thumbnails nothing happens. I can view the larger images if I use their direct path though. The JS Requirements path is correct and I could not find a SS_Navigator file to remove as suggested in another post. (Did that refer to the earlier version?)

I am using WAMPSERVER on Windows XP.

Thanks in advance for any tips!

Avatar
Willr

Forum Moderator, 5513 Posts

8 July 2008 at 10:22am

SS_Navigator file to remove as suggested in another post

It wont be a file, it would be a $SSNavigator or something like that in the template - themes/blackcandy/templates/Page.ss . Do you get any JS errors in firebug?

Avatar
evangogh

Community Member, 4 Posts

9 July 2008 at 7:53am

Edited: 09/07/2008 8:33am

I am receiving this: "Error: link has no properties
Source File: http://localhost/silverstripe-v2.2.2/gallery/javascript/lightwindow.js
Line: 557"

Line 557: this.element.title = null ? '' : link.getAttribute('title');

I did a full search of entire local site and could not find any references to $SS_Navigator or $SilverStripeNavigator.

A previous post also suggested not including behaviour.js, but I am not sure from which file I need to remove "Requirements::javascript('jsparty/behaviour.js');" from.

Thanks!

Avatar
Willr

Forum Moderator, 5513 Posts

9 July 2008 at 9:04am

All the JS for the gallery is probably loaded from gallery/code/GalleryPage.php ? Sometimes the JS versions will conflict as the gallery has its own version and the cms uses a slightly older version of prototype

Avatar
evangogh

Community Member, 4 Posts

9 July 2008 at 9:20am

Hmm...could not find any reference to behavior.js in any of the gallery/code PHP pages. Is there any way to fix this problem? Could I replace the Gallery prototype.js with the CMS prototype.js?

Thanks!

Avatar
Willr

Forum Moderator, 5513 Posts

10 July 2008 at 10:32pm

Ok Just got a lightbox working - gallery 0.2.2? or something + silverstripe 2.2.1, similar issue nothing happened when you clicked on the images.

Solution? - well I had to use Requirements::block() for each of the SS JS files - seems like they were conflicting, dont know which one exactly or if its a order thing but I added this to gallerypage.php file in the function init()

function init() {
   
      // Javascript Requirements
      
// these are the old CMS js files that are breaking things
      Requirements::block("jsparty/scriptaculous.js");
      Requirements::block("jsparty/prototype.js");
      Requirements::block("jsparty/prototype_improvements.js");
      Requirements::block("jsparty/loader.js");
      Requirements::block("jsparty/behaviour.js");

// just include the useful stuff
      Requirements::javascript( "gallery/javascript/prototype.js" );
      Requirements::javascript( "gallery/javascript/effects.js" );
      Requirements::javascript( "gallery/javascript/lightwindow.js" );

Avatar
evangogh

Community Member, 4 Posts

19 July 2008 at 2:17am

Well, the GalleryPage.php already had the new Requirements that you posted, willr. So what I finally did was revert back to silverstripe 2.2.1 (I had been using v2.2.2) and reinstall gallery 0.2.2. I then downloaded GalleryPage.php from the latest daily build and the lightbox finally worked!

It took many hours of trial & error, but at least I finally have a functional gallery. willr, maybe you'd be able to figure out what is keeping the gallery from working with silverstripe 2.2.2? I'm perfectly happy with 2.2.1, but it might help future users.

Thanks for all the help!

Avatar
juandavidgc

Community Member, 36 Posts

16 September 2008 at 11:46pm

Hi!

Well, i have a problem. I'm using the gallery module in my site, and i'm using too JQuery. I have been included this js Willr, buy the gallery didn't work. There are a problem with compatibilities with prototype-srciptaculos with jquery?

thanks!

Go to Top