I've been adding lightbox2 functionality to my new site and I'm really excited about it! I've just had a few things that are happening that are kind of weird.

1. When I'm loading an image or a form (it happens in both cases) the pre-loader spinner won't stop – even when the image or form has already loaded!

2. The other thing that's happening is that I get two close (or 'X') images... what could be causing this?

Thanks very much for your help!

Comments

stella’s picture

Status: Active » Closed (duplicate)

Please read the known issues page before submitting an issue. :)

This is a duplicate of #276985: Constant animation in I.E 7 and broken image.

tflmike’s picture

Hi Stella-

Thanks for your quick response!

I checked out the duplicate issue and although I think something similar is happening, I don't think it's the same situation. I'm not having the issue in IE (I'm not even testing on IE yet) and I don't have the nice menus module installed.

But in the issue you mentioned that there might be a duplicate version of jquery.js... So I'm wondering where I could find the call to jquery.js in the module so I can comment it out? Or do you think lightbox lite might not have that issue?

Thanks!

stella’s picture

Status: Closed (duplicate) » Active

The lightbox2 module doesn't add jquery.js itself. It is done by core. I would recommend looking at your theme's template files to see if it is being added there. However, first you should check the page source (View -> Source in FF3) and see if you can spot a duplicate call to jquery.js or other js files.

Also, see if any errors appear in Firefox's Error Console (under Tools menu). Perhaps check other browsers/ platforms to see if it happens for them all or only some.

Cheers,
Stella

tflmike’s picture

Ah... that did it!

I did a check and I discovered that I had both:
<?php print $scripts; ?>
and
drupal_get_js('header' , $js);

I'm not sure what the difference between the two is, but I just got rid of the print $scripts; because the drupal_get_js seemed more 'proper'.

So everything seems to work now!

Thanks for pointing me in the right direction!

stella’s picture

Status: Active » Fixed

If it's in the theme layer (in a tpl.php file) I think actually <?php print $scripts; ?> is preferred. Glad it's working for you.

Cheers,
Stella

tflmike’s picture

Would my template.php file be considered the theme layer? Or is it only the template files themselves?

Do you know if there's any difference in the way the code operates?

stella’s picture

template.php is part of the theme layer. It's probably best to ask a themer on the specifics of though.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

jdeg’s picture

I got the same problem when i include "drupal_add_js" and "drupal_add_css" into function _phptemplate_variables. After some fails i put it outsite the function, in the beggining of the template.php and everything is good now.