I have a page where Lightbox2 works under FF3 but it does not work under IE7 (it reports an error).

After some bugfixing it seems to me that the error is caused by the following variables having no values:
borderSize
boxColor
fontColor

All these are set in the Advanced / Skin settings section of the admin/settings/lightbox2 page.
After installing the module these values were empty and the lightbox.js script was causing error in IE7.
Specifying some default values solves the problem.

CommentFileSizeAuthor
#3 lightbox_default_js_values.patch2.55 KBaries

Comments

stella’s picture

What is the error reported?

mtcs’s picture

Invalid argument in line 182 char 5 (IE7 omits the filename but it is lightbox.js)
The next two lines (183, 184) also cause errors after fixing line 182.

I think these lines are fine but something should be done around line 97:

Lightbox.borderSize = ((s.border_size!="") ? s.border_size : 0);

(Same should be done for other vars.)
There might be a better place to fix this problem.

aries’s picture

Assigned: Unassigned » aries
Status: Active » Needs review
StatusFileSize
new2.55 KB

Hi

I did a patch which fix the bug inside the module.

mtcs’s picture

I can confirm the patch works perfectly.
Thanks!

JPE’s picture

Hello, I have the same problem #2 but it not works for me. The error in line 184 is always and can't use or see lightbox in IE7. Somebody has Another issue, please. I can't find the solution. Thank you.

stella’s picture

Status: Needs review » Fixed

Committed, thanks!! Fix will be available in the next dev release later today.

Cheers,
Stella

petr illek’s picture

What is the hex value for transparent overlay? If I leave the field for Overlay color in Overlay Setting blank I got error in IE. If I provide some color (e.g. 000) It work, but I need it transparent, because I'm providing my own png for overlay...

stella’s picture

You should be able to ignore the hex field - just set it to any valid value, and set the "Overlay opacity" to 0.0. Not all browsers support opacity, so I'd recommend choosing a good fallback hex value for those browsers.

Status: Fixed » Closed (fixed)

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

finex’s picture

I'm using Lightbox 6.x-1.9. Is it safe to upgrade to the -dev version for having the fix to this bug?

finex’s picture

I've applied the patch to 6.x-1.9, but IE8 still gives me that error.