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

enkara’s picture

I've seen that this only happens in Linux Firefox, even with Firebug disabled.

Thank you

fourmi4x’s picture

I 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 ?

fourmi4x’s picture

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

stella’s picture

Status: Active » Fixed
AlexisWilke’s picture

Version: 6.x-1.9 » 6.x-1.10
Status: Fixed » Active

Hi 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?

AlexisWilke’s picture

I see in the JavaScript that you could check whether the fadeInSpeed is 0 and do a show() in that case:

      if ($.browser.safari || Lightbox.fadeInSpeed == 0) { // <- added a check here
        $('#lightboxImage').css({'zIndex': '10500'}).show();
      }
      else {
        $('#lightboxImage').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed);
      }

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

AlexisWilke’s picture

Okay, 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

stella’s picture

Status: Active » Fixed

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

AlexisWilke’s picture

stella,

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

stella’s picture

You didn't provide a link to your website.

AlexisWilke’s picture

Yes, in #5 with all the info to reproduce the problem.

Thank you for looking into it.
Alexis

stella’s picture

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

Jon Pollard’s picture

Hi, I have had a similar problem, disabling 'show caption' seems to have got rid of the 5 second delay.

AlexisWilke’s picture

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

stella’s picture

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

Jon Pollard’s picture

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

stella’s picture

Sanitization on input is not a possibility I'm afraid.

AlexisWilke’s picture

jonty,

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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

roball’s picture

For me the delay problem have (almost) been solved by setting "Appearance duration" at admin/settings/lightbox2 -> Advanced settings -> Animation settings to 0 (zero).