When loading my site using IE8 I get the following JS error:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

Message: Invalid property value.
Line: 184
Char: 5
Code: 0
URI: http://app.o-festivalen.com/dp6/sites/all/modules/lightbox2/js/lightbox....

I does not get any lightbox effects clicking on images.

In Firefox I don't get any error on page loading, and the lightbox effect works well on some images (but not with others - not sure if this problem is related to the JS-error - will do some more testing before I might file separate issue...)

By the way: Images i s handled using Image Assist together with Wysiwyg/TinyMCE (all latest dev versions).

CommentFileSizeAuthor
#17 color-fix.patch1.55 KBjhl.verona
#10 patch-lightbox.js_.patch832 byteslnunesbr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Duplika’s picture

I have the same problem but on line 181. It works flawlessly at Firefox and Chrome. Yet, on IE8 it doesn't.

Duplika’s picture

Version: 6.x-1.x-dev » 6.x-1.9

I have the same problem but on line 181. It works flawlessly at Firefox and Chrome. Yet, on IE8 it doesn't.

zarouk’s picture

Hi all,

Same problem for me on IE8 on line 181.
Works fine on Firefox.

Best regards,

Countzero’s picture

Version: 6.x-1.9 » 6.x-1.x-dev

Same problem with dev version and IE7, line 185 : 'invalid property value'.

This bug seems critical as it prevents at least some uses of the module with IE.

For example, the login functionality is totally broken : no popup and form displayed without styling in a normal window.

I also had to disable it on some pages because it prevented one custom script of mine to work.

diederik_2mpact’s picture

subscribing

Javier’s picture

Same problem here with dev version and IE7, lightbox is not working and I get the following error message:

Line:185
Character:5
'Invalid property value'

Hope someone can help.
Thanks in advance.

malphas’s picture

I have the same problem for IE8 and IE6

Subscribing...

mixman’s picture

I've tracked the problem down to the skin settings of lightbox2 - this is only an assumption, but I think that the default values for this section are invalid (empty) and jQuery is freaking out (undefined values). At least for IE7/8 of course (argh...)

Just go to /admin/settings/lightbox2 Advanced settings/ Skin settings and set the options:
- border size,
- lightbox color,
- font color
to some values (can't be empty).

nilsel’s picture

Thanks Mixman! Had the same problems here, setting the skin border size and colors solved it right away, now the lightbox plays without js-errors in IE 6, 7 and 8 :) I'm using lightbox2-6.x-1.9.

lnunesbr’s picture

Status: Active » Patch (to be ported)
FileSize
832 bytes

As mixman has said, the options - border size, lightbox color and font color must be set in the admin area, if not checked, returns a js error in IE8.

I actually made some update in the "lightbox.js" to prevent that, so, it checks if the respective variables really exists:
Lightbox.borderSize
Lightbox.boxColor
Lightbox.fontColor

And checking that, if undefined variables, prevents to make an invalid js call.

version: lightbox2-6.x-1.9

thx
leandro nunes

zilverdistel’s picture

subscribing

YK85’s picture

+1 subscribing
is there a chance of this patch being committed? thanks!

chris_car’s picture

I had the same problem on IE7 and IE8 and setting skin values fixed the problem! Thanks!!!

joakimekroos’s picture

Skin values did the trick for me too. Thanks!

yousername’s picture

Skin values it is!
Thank you!

jhl.verona’s picture

I have just spent a frustrating couple of hours figuring this out for myself - before reading the issue queue - sigh.
I can confirm that if the Lightbox color, Font color or Overlay color are missing, then a Javascript error occurs attempting to set backgroundColor = '#' for IE 8. Firefox ignores the error.
If you understand a little Italian (or just look at the code) I've explained my debugging process here: http://www.drupalitalia.org/node/10016#comment-33975

The patch in #10, while a good start, only cures the symptom, not the illness. These values should be validated in the module form code itself - but are not (CVS version DRUPAL-6--1-9).

HTH

John

jhl.verona’s picture

FileSize
1.55 KB

Ok. Now I know why they weren't validated - an i18n slip and a typo. Patched against DRUPAL-6--1-9, which I think is version 6.x-1.9
(A small price to pay for such a useful module)

HTH

John

YK85’s picture

Status: Patch (to be ported) » Needs review
stella’s picture

Status: Needs review » Fixed

patch from #17 committed, thanks!

Status: Fixed » Closed (fixed)

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

lovespell88’s picture

I have found another annoying error in IE. Wonder if any of you guys encountered 'Expected identifier, string or number'. It will break all your JavaScript in IE. It's a nightmare to debug - even with Microsoft Script Debugger. And this javascript errror is only present in IE, you wouldn't have it in Safari, Opera, Chrome or Firefox