Problem with jquery 1.3.x

bricef - March 23, 2009 - 16:57
Project:Lightbox2
Version:6.x-1.9
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

I recently add the last version of jquery (1.3.2) in drupal with jquery_update and it seems to break lightbox2. When i try to click on a link, it opens a lightbox without image. I add two screen shot.

It works with lightbox2 lite but i like to use lightbox2. Does anyone have the same problem with this version or Drupal 7.X?

How can i help to reports more information in order to debug this problem.

Kind Regards,
Brice Favre

AttachmentSize
before.jpg173.95 KB
after.jpg102.15 KB

#1

stella - March 23, 2009 - 17:29
Category:bug report» feature request
Priority:critical» normal

This is currently not supported. Until then you can use the version that comes with Drupal.

Drupal 7.x is not ready for production sites and should not be used.

Cheers,
Stella

#2

szy - March 25, 2009 - 17:04
Category:feature request» bug report
Priority:normal» critical

@stella, bricef said 'or 7.x'... :]

Yes, it happens for me too - in 6.x. When I click for anything on my site
(in the public part of it - not only admininstration) lightbox opens a broken
image, just like bricef has shown it.

It happens after the latest dev updates - JQuery 2.x, Popup Reference,
and others - there must be a conflict between one of them and Lightbox.

Szy.

#3

stella - March 25, 2009 - 17:09
Category:bug report» feature request
Priority:critical» normal

Yes, I saw that. The first part of my comment was referring to the 6.x bit. :)

No support has been added to lightbox2 for jquery 1.3.x yet and to add this support is a feature request. Resetting issue status.

#4

szy - March 25, 2009 - 17:20

Sorry :), and thank you for your work :]

Szy.

#5

tic2000 - April 9, 2009 - 21:42

A solution that works for me.
Note that I didn't test on all the option that the lightbox 2 module has to offer, but just on a simple image and on a group of images and it worked with no problem.
As the release notes of jQuery 1.3 mention "@" no longer works in selectors. It was already deprecated in 1.2. So all I did was to look for "[@" in all js files that come with lightbox module and replace the occurrences with "[". I uploaded all the files on the server, re-enabled the jQuery Update module and my gallery works.
Now if this solution can be used with no drawbacks I don't know. If drupal 6 came with jQuery 1.2 at least it should be no problem I think, since "@" was deprecated anyway and I did test on my site (with drupal 6.10) without jQuery Update and the modified files worked (again I say, I only tested on images).

Later edit:

I did test the lightframe (with external links and node content) and lightshow options and they work too. On lightframe when using the example in readme.txt from "Controlling iframe property when grouped example" it only showed 2 of the pages and not 3 as the number of links. I don't know if this is normal, or this is the way it was before because one link was used twice.
I have no video in place to test lightvideo too.

#6

mrgoltra - April 9, 2009 - 23:02

subscribing.

#7

davidwhthomas - April 14, 2009 - 02:47

I had the same problem, all links became blank lightbox popups.

jQuery: 1.3.2
Lightbox2: 6.x-1.9

I patched the js files as suggested above to conform to the new 1.3.2 syntax, basically find + replacing [@ with [

The patched files are attached.

testing and working.

DT

AttachmentSize
lightbox.js_.patch 3.61 KB
lightbox2.js_.patch 20.51 KB
lightbox_modal.js_.patch 899 bytes

#8

davidwhthomas - April 14, 2009 - 02:42

and here's the patched js files themselves in a zip, for those who like it that way :)

DT

AttachmentSize
lightbox2_jquery-1-3-2_patched.zip 11.13 KB

#9

stella - April 16, 2009 - 15:36
Status:active» needs review

#10

jcmarco - April 19, 2009 - 10:06

Related with this issue #358082: jQuery 1.3 in Drupal 6.x

Patch tested and works fine, allowing the use of the admin screen and not opening modal screens in any link

#11

adrinux - April 23, 2009 - 08:38

Patches do fix the problems, Admin menu links work as they should, lightbox links work as they should.

And here's davidwhthomas's changes re-rolled in a single patch, for the lazy patcher ;)

AttachmentSize
lightbox2-jqselector_1.patch 24.9 KB

#12

batbug2 - April 28, 2009 - 15:20

Seems fine to me.

#13

AlexisWilke - May 1, 2009 - 09:58

Is that change compatible with jQuery 1.2?

Thank you.
Alexis

#14

tic2000 - May 1, 2009 - 10:45

@ was deprecated in jQuery 1.2. That means that using it or not was the same thing.
The simple answer is yes, it works with jQuery 1.2

What do we need to get this added in lightbox2 release? Since it doesn't brake absolutely nothing (Drupal 6 came wtih jQuery 1.2.3) and it makes this compatible with jQuery 1.3.

#15

AlexisWilke - May 1, 2009 - 19:06

tic2000,

Well! Yes! We should fix lightbox2 because a lot of people are using jQuery Update for other modules to function properly...

And if it is to work with all versions, I do not see a problem. 8-)

Thank you
Alexis Wilke

#16

tic2000 - May 1, 2009 - 22:51

The maintainer of the module can do it, not us. We can test the patch and report any problem we find with it. Till now I found none and as I said in my previous reply, it can't brake anything this patch for D6. In D5 it's another story.

#17

AlexisWilke - May 1, 2009 - 23:44
Status:needs review» reviewed & tested by the community

tic2000,

I know how that works, I have several modules too, you can check out my profile... 8-)

Worked for me and you and several others so I'm changing the status!

Thank you.
Alexis

#18

stella - May 2, 2009 - 00:06
Status:reviewed & tested by the community» fixed

Committed! Thanks everyone for the good work, especially davidwhthomas, adrinux!

Cheers,
Stella

#19

Nashville Drupaler - May 4, 2009 - 21:49

Now I have this error

Error: [Exception... "'Syntax error, unrecognized expression: )' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

#20

tic2000 - May 5, 2009 - 07:20

This to me seems like a problem in your browser. I see some of this errors in FF too and they are not consistent. Some times they appear, some times don't. But they don't affect the javascript in the page. I don't know if it's the same for you or if it's another issue.

#21

Nashville Drupaler - May 5, 2009 - 15:33

I don't know - but when I disable the jquery update module everything works -....except my navbar - wich needs 1.3.2

#22

stella - May 5, 2009 - 15:50

@roberttwobears: if you disable lightbox2 but not jquery_update do the errors disappear?

#23

Nashville Drupaler - May 11, 2009 - 12:26

yes - the errors disappear with jquery update enabled, but the Lightbox2 module off

Thanks Stella

#24

sdrycroft - May 12, 2009 - 10:27
Status:fixed» active

I'm experiencing the same problems as roberttwobears. The problem disappears when disabling the Lightbox2 module or the JQuery Update module. I only get this problem with the 6.x-2.x version of JQuery Update (and not 6.x-1.x).

[Exception... "'Syntax error, unrecognized expression: )' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "<unknown>"  data: no]

#25

Nashville Drupaler - May 14, 2009 - 15:20
Category:feature request» bug report

reverted and disabled jquery till this is resolved

#26

tic2000 - May 14, 2009 - 16:15

Strange, I have both last jquery update module and Lightbox 2 and I don't see this error anywhere with latest FF, IE7, Safari or Chrome.

#27

AlexisWilke - May 15, 2009 - 03:45

tic2000,

Yeah. I do not have any problems either and I'm running over 10 sites already. They don't all use Lightbox2 but those that do have many other modules.

It sounds to me that one of the other modules used by roberttwobears and sdrycroft must be in conflict, somehow.

Thank you.
Alexis Wilke

#28

sdrycroft - May 19, 2009 - 12:19
Status:active» fixed

Cheers Alexis, I suspect you may be right. If I get the time, I'll try and track down where the conflict lies.

#29

System Message - June 2, 2009 - 12:20
Status:fixed» closed

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

#30

josedanielestrada - June 15, 2009 - 21:11

Anyone can solve this issue?

#31

Shane Birley - June 16, 2009 - 21:30

I am still experiencing this issue. Everything I have tried so far points at Lightbox2.module - of course, I could be wrong but if I disable it, everything works.

#32

nick_robillard - July 7, 2009 - 03:43

After applying the patch, I'm still getting the "Syntax error, unrecognized expression: )" error. Same as Shane though - when I disable lightbox2, all is well.
I don't see any more @ symbols used in selectors in any files (after patching) so I'm not sure what's causing this...

UPDATE: Updating to 6.x-1.x-dev solved this problem. I'm now running jquery 1.3.2 and jquery ui 1.7.2 just fine. Thanks to the devs for being on top of this. :)

#33

nick_robillard - July 6, 2009 - 06:08
Status:closed» active

#34

baxr6 - July 14, 2009 - 05:11

Still causing an error for me, even after doing all of the above.If i visit
admin/settings/lightbox2/automatic
and click "reset to defaults" the collapsible part starts working but if I change Image Node Settings to lightbox it stops working again.I ended up comparing the source and found that the only real thing added was the js file auto_image_handling.js.So it seems the issue is definately located in this file somewhere.

#35

AlexisWilke - July 14, 2009 - 07:54

For those with the problem, could you create a site with just jQuery & Lightbox2 and test on that site, with no other module turned on?

Thank you.
Alexis

#36

baxr6 - July 16, 2009 - 01:00

Firfox Version: 3.5
Firebug Version: 1.4.0b7

Fresh install of drupal 6.13

turned on optional core module
Upload

Added lightbox2-6.x-1.9 module

added jquery_update-6.x-2.x-dev (jquery 1.3)

Note: as soon as I enabled jquery_update I recieved an error in firebox

Error: uncaught exception: Syntax error, unrecognized expression: ) Line 0

uninstalled lightbox2 and delete
Note: error is gone

Installed and enabled lightbox2-6.x-1.x-dev

every thing is fine so I now go to admin/settings/lightbox2/automatic and under "Image Node Settings" I changed "Automatic handler for image nodes" to "Lightbox" and save.

Note: Now the collapsible fieldset's stop working and firebug shows an error.

Error: uncaught exception: Syntax error, unrecognized expression: ) Line 0

Next I click "Reset to defaults" and everything is back to normal and firebug shows no errors.

Next I copy the source html with "Automatic handler for image nodes" set to "Lightbox" and upload the file to the root directory with the name test.html.
I then remove only one line from the test.html file.

<script type="text/javascript" src="/drupal/sites/all/modules/lightbox2/js/auto_image_handling.js?r"></script>

And the test file starts to function properly.

Just for testing purposes I used the "Break On Next" feature in firebug and browsed to admin/settings/lightbox2 It keeps stopping on the following

File: sites/all/modules/jquery_update/replace/jquery.js

Break: Line 2467: return typeof jQuery !== "undefined" && !jQuery.event.triggered ?

Hope this helps....If you need anything further let me know.

#37

mash200 - July 18, 2009 - 23:31

i'm really sorry if this is a stupid newbie question but i've tried to find a soluiton elsewhere to no avail!

i have D6.13 installed and whichever jquery version is standard in core. i've tried lightbox2 6.x-1.9 and 6.x-1.x-dev (as suggested in other posts) and lightbox2 still wont work. it did (6.x-1.9) with 6.12 through bitnami though (thought that was SO slow!)

the lightbox2 options are there in display fields in my custom content type, and it displays the correct initial image but on clicking it links to the uploaded image file rather than opening in lightbox. i'm using cck/imagefield/imagecache, with field type 'field' and widget 'image'.

should i apply the patch(s)? and if so, how do i do it? there don't seem to be any .js files in the lightbox2 module.

very confused!!!

#38

mash200 - July 21, 2009 - 02:17
Title:Problem with last version of Jquery» Lightbox problem with drupal jQuery?

dont know if i'm doing something wrong but still no joy. have tried with a new, fresh install (6.12), and still lightbox2 or thickbox don't function but do appear as format options. it seems as if the js just doesn't execute correctly. when clicking on thumbnail (imagecache preset selected in either views or display fields with lightbox) just shows image in new browser window rather than as a lightbox overlay :(

modules installed:
imagefield
lightbox2 (tried both 6.x-1.9 and 6.x-1.x-dev)
cck
imagecache
filefield
imageapi
views

using WAMPserver2 on vista. the only change from this install to when it did work is that before i was running the latest bitnami wampstack with bitnami app drupal 6.12, which was unbelievably slow.

how do i patch jQuery? it seems from other posts that its not easy (or possible?) to even find out the version of jQuery running.

please help!

#39

stella - July 21, 2009 - 08:42
Title:Lightbox problem with drupal jQuery?» Problem with jquery 1.3.x

You can find out which version of jquery you're running by going to your site's status report. Do you have jquery update module installed? There should be no problem if you're not using jquery update 6.x-2.x. If you're not running this version of jquery update, please open a separate issue.

#40

baxr6 - July 23, 2009 - 06:37

any ideas on the Automatic handler for image nodes problem yet

#41

Drupal CMS - July 23, 2009 - 14:49

Same problem here, all links turn into Lightbox with no content but the link description. We run Ubercart (including all image modules) and Internationalization modules. Any suggestions?

Other sites show no problems. We run Drupal 6.13 and Jquery 1.2.6.

Any suggestions? Many thanks in advance.

#42

stella - July 23, 2009 - 14:48
Status:active» fixed

Try the attached patch, or the latest dev version (available later today).

AttachmentSize
411162.patch 649 bytes

#43

Drupal CMS - July 23, 2009 - 15:15

Patching worked fine! Thanks!

#44

baxr6 - July 24, 2009 - 03:17

yes confirmed all issues resolved for me.

#45

System Message - August 7, 2009 - 03:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.