Hi,

I am using Lightbox2, 6.x-1.8

Using Firefox, Lightbox2 is working as expected. No problems, lightbox enabled links are looking great. It's a fantastic module, just as a side point!

However, in Internet Explorer (either version 6 or version 7) I am getting the following error:

Line:1033
Char: 1
Error: Expected identifier, string or number
Code: 0
URL:

I have disabled all the other JavaScript modules I am using, those being ext-links and fasttoggle. The error persists. I have disabled the JS aggregator and the CSS aggregator. I have also switched back to the default Garland theme in an attempt to fix it.

I *must* be doing something really dumb, because no one else has reported this problem.

I am using the /sites directory for me site. So the module is installed in /var/main-drupal-dir/sites/SITENAME/modules/lightboxv2

I have tried upgrading to the latest 6.x-dev version, but that doesn't help either.

I've filed this as a bug report just in case I have hit some corner case problem, but I suspect the fault is mine. I can't for the life of me figure it out though, it's especially annoying as FF does work well.

Thoughts/tips on how to help debug this issue?

Many thanks,
Tim

Comments

tjharman’s picture

Disabling, then re-enabling, a number of different modules on my site (in order to see if one of them was causing the problem), has fixed this.

I now have all the same modules re-enabled, but this is working now.

Very frustrating to debug, when it's now working.

stella’s picture

Status: Active » Fixed

It may have been because of the JS aggregator. When you disabled it, the js file used may still have been cached unless you forced the Drupal cache to be cleared. The latest dev version of the module should have no problems with the JS aggregator.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

msosin’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Hello,

Which modules and in what order your disabled/enabled.

I have the same problem after upgrading drupal to 5.12...

Thanks in advance
M

stella’s picture

m.sosin : please try the latest dev version of the module. Don't forget to run update.php and clear your browser cache after upgrading.

Cheers,
Stella

kuz’s picture

Upgrading ImageCache was solution for me

stella’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

icekream’s picture

Status: Closed (fixed) » Active

I am having a similar situation. It works fine in FF and chrome but not in IE8 http://clients.travishemlee.com/owtu/audio_clips

I am using a view to display a list of audio clips which when clicked brings up the lightbox with an embedded audio player. While this works in FF it doesn't seem to work in IE.

icekream’s picture

Priority: Minor » Major
scb’s picture

I had this same issue using 6.x-1.10.
The error appeared in line 1166 of lightbox.js. I removed a trailing comma from the previous line and it started working fine.

The code i changed (js/lightbox.js @ line 1163):

      data: {
        'string' : str,
        'allowed_tags' : allowed_tags <--- removed comma
      },

Hope this helps someone.

spinjam’s picture

Same problem for me. Solved with this:
change code @ line 357:
if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) {
with this:
if ( $(anchor).attr('href') && typeof(anchor.href) && $(anchor).attr('rel') ) {