Hi,
I've used Lightbox2 a lot of times in almost all the drupals I've made.
The problem is that in the last site I've configured, the lightbox loads in a strange way: it loads the white window very fast and then really slowly the image is shown, fading from white to the image. In the other sites the lightbox loads in a total different way: when the white window is loaded, then the "loading" symbol spins and in a short time the whole image is shown without fadings.
The problem is that in the first way described, the fading is eternal.
Any ideas? Do you think it can be any kind of incompatibility with any module?
Thank you!
Comments
Comment #1
enkara CreditAttribution: enkara commentedI've seen that this only happens in Linux Firefox, even with Firebug disabled.
Thank you
Comment #2
fourmi4x CreditAttribution: fourmi4x commentedI have exactly the same problem, except after this ever-fading, the slideshow brutally shuts down.
I partially solved it by setting the "Appearance duration" (in Lightbox2 settings > General > Advanced settings > Animation settings ) to 0.1 seconds...!
=> It now appears like 5 seconds... but still shuts down instantly when the fading is finished ! (which is of cure very annoying for complex images...)
I use Firefox/windows.
Any clues ?
Comment #3
fourmi4x CreditAttribution: fourmi4x commentedI forgot that I used the rel="lightshow" attribute... sorry.
So now, when I set "Interval seconds" (in Lightbox2 settings > General > Slideshow) to for example 30 seconds, it shuts down after 30 seconds.. a lot better !
For the animation settings, I have set :
Resize duration : 0.3
Appearance duration : 0.1
Caption slide down duration : 0.3
And no more crapy fading effect... :)
Hope this will help !
Comment #4
stella CreditAttribution: stella commentedComment #5
AlexisWilke CreditAttribution: AlexisWilke commentedHi Stella,
I had no problems in 1.9, but now that I upgraded to 1.10 there is a problem of "slowness". I tweaked the different timings and seen no difference.
So...
1. I click on the image and the window opens, resizing itself and showing the rotating wait GIF
2. The rotating wait image disappear (the 2nd time around, it disappears pretty much immediately)
3. The window stays white for 5 seconds
4. The image is shown at once (no fade)
Just in case, I put 0.1 in the wait to show next image in the slideshow, but I do not use any slideshow. The 'lightbox' is properly set on the anchor.
The site is here:
http://linux.m2osw.com/
and the image is the cartoon below the tags.
[edit] I'm under Linux although as I said, in 1.9 it was working just fine, and it breaks in SeaMonkey, FireFox and Chrome (although it seems to be only 3 seconds in Chrome.)
Let me know if you have an idea.
Thank you.
Alexis Wilke
P.S. The description says to enter a number from 0 to 10 but 0 is not accepted... Is that supposed to be the value that turns off that feature?
Comment #6
AlexisWilke CreditAttribution: AlexisWilke commentedI see in the JavaScript that you could check whether the fadeInSpeed is 0 and do a show() in that case:
It would be necessary to test everywhere, but that would add the capability to really turn off the fading. Otherwise, I do not see a problem here, but I have no clue what fadeinSpeed is set to. I'll try to add an alert() to get the answer.
Thank you.
Alexis
Comment #7
AlexisWilke CreditAttribution: AlexisWilke commentedOkay, when I short circuit this line, the image appears instantaneously!
$("#lightbox2-overlay").show();//fadeIn(Lightbox.fadeInSpeed);
I think there is a problem between the fade in speed for the overlay and the one for the image (animation).
The variable is set to 100 as expected. (I can see in the HTML at the top and I added an alert() and can tell that even at that point it is 100.)
So I would think that you're starting the fade in of the image but that somehow it doesn't fade... although seconds instead of 0.1 sec. seems quite a bit of a difference. (I have a slow computer, but if I run just that...)
Thank you.
Alexis
Comment #8
stella CreditAttribution: stella commentedActually the help text says
Enter a value between 0 and 10.
, so 0 and 10 are both not allowed - that's what "between" means. I've added in the change you suggested though, for the fadeIn speed only though. Other animation settings are not affected.Comment #9
AlexisWilke CreditAttribution: AlexisWilke commentedstella,
I'll check your changes, but my version is very slow... I cannot use version 1.10 right now, which is a problem since there is a security issue...
So it's good to look at my suggestions but they have not fixed anything. (I did a change and if you checked my website, you may not have seen what I was talking about... now I did not share that change and there is still a problem anyway.)
So... I'll wait some time to get a new -dev and see whether it fixes anything with the slowness.
Thank you.
Alexis
Comment #10
stella CreditAttribution: stella commentedYou didn't provide a link to your website.
Comment #11
AlexisWilke CreditAttribution: AlexisWilke commentedYes, in #5 with all the info to reproduce the problem.
Thank you for looking into it.
Alexis
Comment #12
stella CreditAttribution: stella commentedAh so you did, sorry missed that. Well I don't see any real slowness. However you're not using any captions so I'd disable the 'show caption' option at admin/settings/lightbox2 which may make things slightly faster. Also try reducing the 'resize speed' - makes it faster for me when I do it via firebug.
Comment #13
Jon Pollard CreditAttribution: Jon Pollard commentedHi, I have had a similar problem, disabling 'show caption' seems to have got rid of the 5 second delay.
Comment #14
AlexisWilke CreditAttribution: AlexisWilke commentedWell! That's a problem! 8-)
That flag fixed the display issue, but I guess it's not sensible to have such a problem because of that flag?! Plus the image has a title and I never saw it in the lightbox window. Isn't that a bug?
Thank you.
Alexis
Comment #15
stella CreditAttribution: stella commentedThe slowness for caption is not a bug - in order to prevent XSS vulnerabilities, it has to go back to the server to run filter_xss() on the caption text, so there will be an unavoidable delay - but shouldn't be noticeable on any reasonable performing server. If it's meant to have a title, then that might be a different problem - if so, open a separate ticket.
Comment #16
Jon Pollard CreditAttribution: Jon Pollard commentedThe site I was having problems with is running on a windows server - which is much slower at doing drupal stuff than Linux servers. Maybe it's time I moved it to a proper server!
Could the caption text be sanitized when it's entered rather than when it's viewed? That way any delay caused wouldn't matter so much.
Comment #17
stella CreditAttribution: stella commentedSanitization on input is not a possibility I'm afraid.
Comment #18
AlexisWilke CreditAttribution: AlexisWilke commentedjonty,
The problem is that lightbox attaches itself to anchors in JavaScript which means that it has no clue which title will be shown when.
Thank you.
Alexis
Comment #20
roball CreditAttribution: roball commentedFor me the delay problem have (almost) been solved by setting "Appearance duration" at admin/settings/lightbox2 -> Advanced settings -> Animation settings to 0 (zero).