jQuery 1.3 in Drupal 6.x

mikl - January 13, 2009 - 09:52
Project:jQuery Update
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:JavaScript, jQuery
Description

jQuery 1.3 is almost upon us (rc2 is out already): http://groups.google.com/group/jquery-dev/browse_thread/thread/d1d688cdd...

I've tested it against most of the code I've written myself, and I've found no regressions or incompatibilities.

Has anyone tried it with Drupal, and are there plans to roll a release of jQuery Update for it?

#1

mfer - January 13, 2009 - 14:11

jQuery Update will have a release for jQuery 1.3. Once the new version of jQuery is out I'll test it (unless someone else wants to) across all of drupal 6. If there are any issues we will fix them and bundle the fixes with the module. I would expect jQuery Update to come out with a new release in the week or two following the official jQuery release.

Basically, I don't want to do testing more than once and I think jQuery 1.3 release should be tested across all of drupal core.

If you are looking to help test see http://groups.drupal.org/node/5974#javascript for areas that need to be tested.

#2

stella - January 14, 2009 - 15:14

jquery 1.3 was released today FYI

#3

pcambra - January 15, 2009 - 09:10

It would be super useful to have jquery 1.3 in Drupal ;)

#4

Carlitus - January 15, 2009 - 09:26

Yeahh! Live Events! :)

#5

mfer - January 15, 2009 - 10:39

Testing is underway. :)

#6

j0rd - January 19, 2009 - 13:36

subscribing

#7

korvus - January 19, 2009 - 20:41

Subscribing

#8

mfer - January 19, 2009 - 23:12

We have to wait for jQuery 1.3.1 to come out. There's a bug that's causing errors in drupal. The bug has already been fixed in jQuery and will be released in 1.3.1 in the next couple weeks. Details on the issue are available at http://dev.jquery.com/ticket/3837.

#9

John Resig - January 20, 2009 - 14:39

Actually, it's likely that 1.3.1 will be coming out within the next day or two.

#10

mfer - January 20, 2009 - 15:49

Thanks for the update.

#11

nevergone - January 21, 2009 - 11:04

subscribe

#12

DanielTheViking - January 21, 2009 - 19:34

Subscribing.

#13

cmoad - January 21, 2009 - 21:22

Subscribing

#14

mfer - January 22, 2009 - 10:19

#15

gzfelix - January 22, 2009 - 23:17

Subscribing

#16

svilen - January 23, 2009 - 16:50

Subscribing

#17

mikl - January 24, 2009 - 12:51

I've started testing, but after replacing the jQuery files in the replace with the 1.3.1 versions, I get this error on every page:

Error: uncaught exception: Syntax error, unrecognized expression: [@type='file']

I've tried tracing it down, but that's kinda hard, since Firefox doesn't give a line number for the error and even mighty Firebug doesn't have a clue.
I thought I had it nailed down to the admin menu module, but it persists after uninstalling that…

#18

mikl - January 24, 2009 - 13:10

Disregard the previous error. I had a rather nasty case of #338630: Locale is unable to rebuild lost Javascript translation files, so after fixing that, everything (admin menu included) has been working.

#19

mfer - January 24, 2009 - 13:29

@mikl the syntax of [@type='file'] no longer works in jQuery 1.3 for selectors. This is something that we will be dealing with in the update.

#20

mikl - January 24, 2009 - 22:23

#19: Okay, the issue hasn't cropped up again, and my Drupal is humming along nicely. Apparently, there's a lot I didn't know about how Drupal uses jQuery.

#21

mfer - January 28, 2009 - 12:44

jQuery 1.3.1 regression.... $(document).ready() fires after images load in ie. Details at http://dev.jquery.com/ticket/3988 and http://stackoverflow.com/questions/477463/jquery-is-waiting-for-images-t...

I'm going to wait until after this issue is fixed to release an updated version of the module because this regression is rather large and will cause a lot of support requests and head scratching. Unless someone can give me a good reason to jump on this now.

#22

j0rd - January 28, 2009 - 17:39

Personally I would prefer a new release made for jQuery 1.3 of jquery_update on Drupal.org. This would allow early adopters to see a "stable" release and jump on it and get a lot of testing done, and would allow production sites to continue to use the old stable version, which works peachy keen.

I'd suggest jquery_update DRUPAL-6--1-3-beta1 or DRUPAL-6--2-0-beta1 which includes jquery 1.3 .

I have a feeling there will be a lot of regression issues which might popup and jquery team has a history of releasing things a little too soon.

That's my take on it. I'll upgrade some of my sites to jQuery 1.3 once this becomes available.

#23

mfer - January 28, 2009 - 18:43

@j0rd OK, I'll work on a beta release and put a big fat notice on it about the regression. No stable releases until jQuery 1.3 is stable though.

#24

matt_paz - January 29, 2009 - 15:08

subscribing ...

#25

katbailey - January 29, 2009 - 22:55

mfer, let me know if you'd like any help with this as I'd be happy to look into any core js bugs that crop up with the new jQuery

#26

mfer - January 30, 2009 - 03:09

@katbailey there are a number of core issues that pop up in switching to 1.3. Some of them have a solution on the core issue. One known issue is the dragging and dropping to rearrange things.

#27

katbailey - January 30, 2009 - 08:04

@mfer - wow, that's a strange one alright, those rows just disappear into the void! The elements seem to actually get removed from the DOM which seems impossible. I'll keep playing around with it in Firebug and see if I come up with anything but it looks like a tough one...

#28

Flying Drupalist - January 31, 2009 - 22:08

subscribe

#29

cyberpunk - February 2, 2009 - 15:43

Developers of JQuery starting from 1.3.1 version stopped to provide packed version because of compatibility and speed issues. So i think "packed" setting in settings form should be removed along with packed jquery package.

#30

mfer - February 2, 2009 - 16:52

@cyberpunk removing the packed version is a separate issue from this one. No need to kill any kittens by putting all the eggs in one issue.

Removing the packed version has a bike shed conversation attached and I don't want to mess with an update to deal with that.

#31

dropcube - February 4, 2009 - 16:09

subscribing ...

#32

renee - February 7, 2009 - 21:12

subscribing. live() is awesome!

#33

xalen - February 18, 2009 - 15:10

subscribing

#34

darvit - February 21, 2009 - 07:21

#35

kje - February 26, 2009 - 21:40

subscribing ...

#36

katbailey - February 27, 2009 - 00:10

See http://drupal.org/node/350275#comment-1292494 and the comment after it regarding the tabledrag problem.

#37

lukus - February 27, 2009 - 15:27

subscribing

#38

korvus - March 3, 2009 - 18:47

Since it looks like it's close to working for Drupal 7, is anyone up for re-rolling a jQuery Update version that includes jQuery Form 2.21? I'd be glad to test it on my site as the standard Drupal 6 version of jQuery is causing some serious performance problems for my users, and it appears that the problem is fixed in jQuery 1.3.x. As in, I'd be glad to turn it on with a live site that gets thousands of users a day, just because sticking with the alternative seems worse -- I hate to know how many users I lose from "unresponsive script" errors...

#39

Flying Drupalist - March 3, 2009 - 18:54

I'm in the same boat as korvus, I really need this update.

#40

katbailey - March 4, 2009 - 05:17

Whew! I think I got everything in here... i.e. Rob Loach's and quicksketch's changes from http://drupal.org/node/350275#comment-1311426. Hopefully I haven't forgotten anything. Please test.

AttachmentSize
jquery_update_358082_40.patch 381.77 KB

#41

katbailey - March 4, 2009 - 05:24
Status:active» needs review

#42

mfer - March 4, 2009 - 14:24

Awesome work. I'll review this (hopefully) between sessions at drupalcon.

#43

c0m4 - March 5, 2009 - 10:06

subscribing

#44

korvus - March 5, 2009 - 15:59

@katbailey,

Patch doesn't seem to work on the latest dev version (which looks like the latest in Drupal CVS, though I am no master of the web CVS browser). Of course, maybe you are working from a different version and I should just wait for mfer to merge these changes in first...

$ tar xzf jquery_update-6.x-1.x-dev.tar.gz
$ cp jquery_update_358082_40.patch jquery_update/
$ cd jquery_update/
$ patch -p0 <jquery_update_358082_40.patch
patching file jquery_update.module
Hunk #1 FAILED at 16.
1 out of 1 hunk FAILED -- saving rejects to file jquery_update.module.rej
patching file replace/ahah.js
patching file replace/jquery.form.js
patching file replace/jquery.js
patching file replace/jquery.min.js
patching file replace/jquery.packed.js
patching file replace/tabledrag.js
patching file replace/teaser.js
$ cat jquery_update.module.rej
*************** define('JQUERY_UPDATE_REPLACE_PATH', dru
*** 16,23 ****
   */
  function jquery_update_get_replacements() {
    return array(
      'module' => array(
        'misc/farbtastic/farbtastic.js' => 'farbtastic.js',
      ),
    );
  }
--- 16,29 ----
   */
  function jquery_update_get_replacements() {
    return array(
+     'core' => array(
+       'misc/tabledrag.js' => 'tabledrag.js',
+     ),
      'module' => array(
+       'misc/ahah.js' => 'ahah.js',
        'misc/farbtastic/farbtastic.js' => 'farbtastic.js',
+       'misc/jquery.form.js' => 'jquery.form.js',
+       'misc/teaser.js' => 'teaser.js',
      ),
    );
  }

#45

katbailey - March 5, 2009 - 19:21

hmm, I rolled it against the 6--1 branch because HEAD is now Drupal 7, not sure what's happening here... @mfer, were you able to apply the patch?

#46

mfer - March 8, 2009 - 18:55
Status:needs review» needs work

Just to let you all know... working on some strange issues in garland on FF in the blocks admin page. This is still in progress.

#47

mfer - March 16, 2009 - 03:42

For anyone wondering.... I think the bugs are worked out. I hope to post an update this week.

#48

xmoe - March 17, 2009 - 20:57

subscribing

#49

cardentey - March 19, 2009 - 00:37

subscribing

#50

peach - March 19, 2009 - 21:48

subscribe

#51

mfer - March 21, 2009 - 19:50

The DRUPAL-6--2 branch now holds the upgrade code to 1.3.2. This needs to be tested some more before I release the module. The dev snapshot should show up in the next 12 hours to get it from somewhere other than CVS.

Note... this is untested.

#52

jcmarco - March 24, 2009 - 10:19

I have been testing this upgrade with Firefox and I have found this error in some pages using different modules:

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

This other is more explicit using voting_api, fivestar and standard jquery.js (no minified):

[Exception... "'Syntax error, unrecognized expression: [@name=vote_average]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
? in jquery.js?h@2864()jquery.js?h (línea 2869)
? in jquery.js?h@2762()jquery.js?h (línea 2762)
? in jquery.js?h@2665()jquery.js?h (línea 2693)
? in jquery.js?h@2464()jquery.js?h (línea 2468)
[Break on this error]

#53

mfer - March 24, 2009 - 14:07

jcmarco, what modules were you running? If you know what script file this is happening in it would be apprenticed. They can update their code for it to work with both 1.2.6 and 1.3.2 by moving to the following:

jQuery 1.2.x:

$("a[@href*='admin/build/testing']").doSomething();

jQuery 1.2.6 and 1.3.x:

$("a[href*='admin/build/testing']").doSomething();

More detail at http://docs.jquery.com/Selectors/attributeHas#attribute

#54

jcmarco - March 24, 2009 - 17:33

I have already checked the modules using that reference in two different testing/development servers.

On these modules I really found bugs when testing the pages:
Views 2.x (it was impossible to use the Views UI)
FiveStar

And I also found that modules with that kind of @ reference:
OG_Access
ThickBox
Lightbox2
CTools
Coder
SignUp
Inside WYSIWYG as plugins: TinyMCE (3.2.1 is wrong but 3.2.2 is right) & FCKEditor 2.6.4
PathAuto
Paging
FAQ
Community Tags

That should be probably be added to Coder module and Drupal module migration book in order to warn people about this incompatibility.

#55

mfer - March 24, 2009 - 20:48

Just added an issue requesting this in coder... we are going to have some problems with jQuery 1.3.x for a bit it looks like.

#56

jcmarco - March 25, 2009 - 00:38

Views has been fixed, one less:

http://drupal.org/node/366250

#57

mfer - March 25, 2009 - 13:25

fivestar has been fixed as well. see #412126: Remove @ from selectors

#58

markus_petrux - April 4, 2009 - 04:02

Subscribing

#59

dddave - April 9, 2009 - 07:15

subscribing

#60

mrfelton - April 9, 2009 - 07:33

subscribing

#61

asak - April 10, 2009 - 11:07

subscribing.

#62

markus_petrux - April 10, 2009 - 11:38

Is there anything that can be done to help in any pending issue?

Would it be helpful to use a tag to identify issues that are preventing this update from being released?

#63

KrisBulman - April 14, 2009 - 18:12

subscribing

#64

mfer - April 15, 2009 - 12:16
Version:6.x-1.x-dev» 6.x-2.x-dev

I've moved this to the 2.x branch. That's where the code actually lies.

@markus_petrux at this point the 2.x branch needs to be tested with other drupal modules and those modules need to know where they aren't working. The most common issue is with the usage of @ in the selectors.

Once more of the modules have been tested I'll create a release. If you want to go ahead and use the 2.x branch please do. It's been updated. I just don't want to create a release, have a few thousand people install it, and break a bunch of sites.

#65

markus_petrux - April 15, 2009 - 12:22

@mfer: Thank you very much! :-D

Installing 6.x-2.x-dev right now. I'll be using it for the projects I'm working on, and will report back any issue I may find. I'll also try to switch to jQuery UI 1.7, so that it fixes a few browser issues that I have to workaround in the meantime.

#66

markus_petrux - April 15, 2009 - 17:55

Just wanted to give some feedback after installing 6.x-2.x-dev with jQuery 1.3.2, and then, also upgrading to jquery_ui module to jQuery UI 1.7.1. Wow! Impressive! I'm really amazed by the performance improvements made to jQuery. And it makes you feel really comfortable to work with latest versions of these packages.

I don't think it's necessary to list all the modules we have installed, but we have a lot, including the major modules like views, cck, wysiwyg api, admin_menu, etc. No problem found, at least for the moment. Well, let me cross fingers, eh.

Thank you! :-D ...just wish there's not many issues and 6.x-2.x can go live soon.

#67

mrfelton - April 15, 2009 - 18:30

I upgraded a site running over 120 modules, and haven't noticed any problems yet...

#68

jcmarco - April 15, 2009 - 19:11

I tested again some modules after some updates on them, and I focus just in most used ones, as there are many ones with the @ issue around.

Views & FiveStar are working fine once they were fixed.

But:

Thickbox: #434660: Remove @ from selectors (it could be affecting as well to the thickbox login screen but I couldn't test it)

OG_Access !! #428824: Outdate jQuery selectors

Pathauto: node edit screen #434630: Remove @ from selectors

SignUp #434644: Remove @ from selectors

User Relationships UI (not tested yet, but it only affects to the popup sending button)

Paging (affecting to the configuration screen) #434652: Remove @ from selectors

Anyway I found some other modules that could have problems and I will test them:
> community tags
> faq
> lightbox2 (I almost forget this one)

@mfer I am using your description for the issues you open before because you explain it better than me.

#69

renee - April 15, 2009 - 19:18

The tabbed block module appears to be working just fine, as does FAQ and faq_ask for me.

#70

davidlerin - April 17, 2009 - 02:21

subscribing.

#71

markus_petrux - April 17, 2009 - 02:31

The date_popup widget that comes with date module seems to look weird after the upgrade to jQuery 1.3.2 + jQuery UI 1.7.1. Anyone else?

#72

jcmarco - April 17, 2009 - 08:34

@markus_petrux I was checking that module as well because I found some issues there, and finally everything was related to other module I patched/reported as OG_Access or pathauto ( I don't remember which one). Please check the patches I reported to that modules and test them, this way you could validate them at the same time.
Other question could be related with the jQuery UI that I am not testing at this time, because date popup says that if the jQuery UI exists it doesn't load its plugin, and there could be some conflict with that.

#73

jcmarco - April 17, 2009 - 08:55

More testing, more patches, more issue reporting:

Paging: confirmed that it is affecting to node view and admin screen, reported patches for both js
#434652: Remove @ from selectors

Community Tags: bugs found, patch released and report to module issue queue:
#436446: Remove @ from selectors

User Relationships UI: reported issue and patch:
#436448: Remove @ from selectors

Please check the patches reported and validate them on each module issue list

#74

markus_petrux - April 17, 2009 - 09:41

Date is (and it was) using ui.datepicker from jQuery UI libraries in jquery_ui module. It worked ok before upgrading, with jQuery 1.2.6 and jQuery UI 1.5.3, but not now with 1.3.2 and 1.7.1 respectively.

Date module is using other components of its own: custom CSS classes for ui.datepicker and the jQuery Time Entry plugin. Maybe the problem lives here since standalone ui.datepicker from jQuery UI work correctly. It doesn't when used from Date popup widgets, however.

I checked ui.datepicker classes provided by Date and still not able to see where could be the problem, if it is there.

Also, checked the homepage of jQuery Date Entry plugin, and here there's something about upgrading from jQuery 1.2.6 up to 1.3.x:

http://keith-wood.name/timeEntry.html

I could open an issue to the Date project, but I first wanted to comment the issue here, as it maybe related to something else particular to my configuration.

Edit: I just opened a feature request to the Date module: #436490: Add support for jQuery update to 1.3.x and jQuery UI 1.7.x

#75

Boobaa - April 17, 2009 - 21:14

subscribing

#76

jcmarco - April 19, 2009 - 10:13

Status Update

FIXED:

Paging: Fixed with #434652: Remove @ from selectors
User Relationships UI: Fixed with #436448: Remove @ from selectors
Thickbox: Fixed with #434660: Remove @ from selectors
Pathauto: Fixed with #434630: Remove @ from selectors
SignUp: Fixed with #434644: Remove @ from selectors
views: Fixed with #366250: jQuery 1.3.x and Views UI
fivestar: Fixed with #412126: Remove @ from selectors

PENDING:

OG_Access: Pending #428824: Outdate jQuery selectors
Community Tags: Pending with #436446: Remove @ from selectors
Coder: Updated and patch issued with #412626: Detect @ in a[@href*= for jQuery
LightBox2: Reported in #411162: Problem with jquery 1.3.x
FAQ: Pending in #438148: Remove @ from selectors

KNOWN ISSUES:

--
--

#77

renee - April 20, 2009 - 20:23

I think add to pending the Ajax module, issue #439540 (just posted by me). I had to do some massaging to get it working, but it appears to be mostly ready.

#78

markus_petrux - April 24, 2009 - 11:47

Another module affected by @ is taxonomy manager. I just created a bug report using jcmarco's "template" :)

#443830: Remove @ from selectors

Will provide a patch for that in a few minutes.

Edit: patch attached to that issue.

#79

jcmarco - May 3, 2009 - 18:23

IMHO, with #452376: jQuery 1.3.x (Problem replacing modified version of tabledrag.js) I think that the this modules could be considered good for a release.
The rest of issues in any other modules, like the ones considered in this issue, are related with a wrong use of a deprecated reference,
and probably, a good entry in the module migration book would help to ease the process of migration, and helping people discovering all
the possible issues related with the @ reference in other modules.

#80

jcmarco - May 4, 2009 - 02:28

New reported issue with menu type configuration in Ctools/Panels

#452700: Remove @ from selectors

#81

kenorb - May 27, 2009 - 10:11

The same problem here:

[Exception... "'Syntax error, unrecognized expression: [@type='file']' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
[Break on this error] undefined
Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible.

Reverting to 1.2.6 works.

#82

markus_petrux - May 27, 2009 - 10:23

@kenorb at #81: That doesn't help much, I think you should tell us which is the module that is causing that error. Probably, something that uses jQuery in that module is using the deprecated selector [@type='file'], and that should be fixed to look like [type='file'] (without the @), but your report doesn't help much to know where this selector is being used.

#83

kenorb - May 27, 2009 - 10:47

I didn't know that's working in this way.
I've found:

$("input[@type='file']", context).change( function() {

in filefield.js (filefield module)
Dev version of this file have a little different line:
  $("input[type='file'][accept]", context).change( function() {

I'll test dev version of module and check if this will help.
Thanks in advance.

#84

lucian303 - June 8, 2009 - 03:07

So far I manually replaced the 1.2.6 files (while keeping backups), ran new jquery update in D6 w/ no problems. so far

#85

vivianspencer - June 29, 2009 - 21:41

subscribing

#86

logicalpat - July 8, 2009 - 13:59

Subscribing

#87

muggin - July 12, 2009 - 12:41

subscribing

#88

jmar777 - July 17, 2009 - 19:15

subscribing

#89

mark_r - July 19, 2009 - 14:37

subscribing

#90

oysstr - July 30, 2009 - 07:13

subscribing

#91

quindio - August 11, 2009 - 04:32

A dumb question for you experts but what do I need to do to use jquery 1.3 with Drupal 6?
Thanks - :-)

#92

muggin - August 11, 2009 - 08:27

#93

Tom.INXCO - August 12, 2009 - 07:49

subscribing and testing

#94

kenorb - August 12, 2009 - 09:50

quindio: install this module (See: #92)

#95

gausarts - August 17, 2009 - 04:48

sunbscribing for updates. Thanks

#96

gausarts - August 17, 2009 - 04:48

subscribing for updates. Thanks

#97

marcus7777 - August 18, 2009 - 10:29

me too (subscribing).

#98

iaminawe - August 25, 2009 - 15:18

subscribe

#99

klamzo - October 22, 2009 - 19:15
Project:jQuery Update» Extra Voting Forms
Version:6.x-2.x-dev» 6.x-1.x-dev
Component:Code» User interface
Category:feature request» bug report
Priority:normal» critical

Erro in the form received when trying to vote in IE with registered user.

#100

dddave - October 22, 2009 - 22:07
Project:Extra Voting Forms» jQuery Update
Version:6.x-1.x-dev» 6.x-2.x-dev
Component:User interface» Code
Category:bug report» feature request
Priority:critical» normal

Setting back. There is an issue about this a extra voting forms (and I noticed that you found it also).

#101

AdrianB - October 30, 2009 - 10:27

subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.