Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Gallery module IE6 & 7 pagination bug

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

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

Page: 1
Go to End
Author Topic: 2525 Views
  • Jarri
    Avatar
    Community Member
    10 Posts

    Gallery module IE6 & 7 pagination bug Link to this post

    Apologies for reposting this from a different thread - I just think it is worthy of a thread of it's own to give it more focus:

    Has anyone got any idea how we can go about sorting out an outstanding pagination/image selection bug in the Gallery Module for ie6 and ie7. This has been mentioned on the forums a number of times and is listed on defect ticket #2440.

    PROBLEM:
    On any page other than the first, whichever image is chosen, lightwindow will display the last image from the previous page. This is highly disorientating for the user.

    Since the Flikr extension seems to work fine in this regard, would this suggest that the problem is less likely to be in the lightwindow.js and more likely in the gallery .js? - could a solution be found by looking at the way the Flikr module handles pagination?

    The effect can currently be seen on the live Silverstripe demo site. In my opinion this makes the current gallery module unfit for use for IE over multiple multiple pages - does anyone have any workarounds they could share?

    I'm afraid I don't have the skills to take this on - can anyone help?

  • Jarri
    Avatar
    Community Member
    10 Posts

    Re: Gallery module IE6 & 7 pagination bug Link to this post

    Can anyone with a knowledge of the Gallery Module please assist? This issue even affects the official live SStripe demo site for both IE6 and IE7 (eg: http://demo.silverstripe.com/gallery/?start=84 )- making the gallery currently unusable for my project. Users cannot effectively view their chosen image in anything other than the first page. If someone could just give some ideas of how to go about debugging and fixing this I'd be glad to help in any way I can.

    Also if this is really to tough to crack, could anyone suggest a workaround - perhaps not using the Gallery Module but other gallery/lightbox functionality that could be made to work- though I'd need to keep the photos on our server as opposed to Flikr etc.

  • Jarri
    Avatar
    Community Member
    10 Posts

    Re: Gallery module IE6 & 7 pagination bug Link to this post

    Bug identified - Solved!- (well worked around!) I need a little help to test this and get a REAL solution.... one that doesn't break stuff!

    Right - so first we need to look at why Flikr module works ok with IE6,7,8 and the Gallery module does not.

    Looking at the generated html it shows that the Gallery module, in addition to generating a table of images to be accessed via Lightwindow for the current gallery page, ALSO produces two hidden divs (with display set to none) of links, which represent the rest of the gallerys pictures from the other pages. One set of hidden links for images prior to the current page (placed before the table) - then a second set of links for the remaining images after the current page (placed after the table). The Flikr module simply provides the links for the current page.

    IE's problem appears to be that instead of feeding Lightwindow the data for the item clicked from the table it appears to grab the Last of the hidden links prior to the table element - hence the reason it appears to work fine on the first page - when the prior hidden div is empty. This behaviour seems peculiar to IE.

    Ok - so knowing absolutely nothing about either Javascript, I tried the brute force method of simply removing these hidden divs from GalleryPageContent.ss (after making a security copy...!) and sure enough it solved the issue with IE - it now shows the correct image when clicked on all pages - Great!

    Next thing to find out was what I'd broken... the one thing I've noticed so far is that I have broken the image "counter" eg. "image 45 of 78" - This now only gives the number of the image in the current page rather than the image number in the gallery as a whole. I am guessing that the hidden div's were a solution to this - which in turn caused their own problems. At least that's what I'm hoping cos I can live with that!

    Please can someone who actually knows what they're doing take a look at this to see if this is a workable solution - or if those hidden divs had another purpose... and/or find a way to restore a proper image counting solution that doesn't break IE?

    I'll add this as a proposed solution on the bug tracker - until something better turns up.

  • 247hosting
    Avatar
    Community Member
    4 Posts

    Re: Gallery module IE6 & 7 pagination bug Link to this post

    Is there any solution to this? or do we just delete the <div style="display:none"> </div> out of the file?

    2525 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.