Upgrade to JQuery 1.2.6

dereine - July 2, 2007 - 18:56
Project:jQuery Update
Version:5.x-2.x-dev
Component:Code
Category:task
Priority:critical
Assigned:Unassigned
Status:closed
Description

Is it possible to integrate the new Version 1.1.3
It should speed up the performance by 800%

#1

alienbrain - July 4, 2007 - 15:03
Title:JQuery Update» JQuery 1.1.3 Update

Yes that would be great!

I didn't try 1.1.3 with Drupal yet, But there is no compatibility plug-in (yet) so chances are it will break core.

#2

alienbrain - July 4, 2007 - 15:06

I didn't try 1.1.3 with Drupal yet, But there is no compatibility plug-in (yet) so chances are it will break core.

No wait, I take that back. It's a maintenance release so probably there are no API changes. So the current compatibility plug-in should be working fine.

#3

anisotropic - July 4, 2007 - 17:17

I tried this on my 5.1 site with the latest jquery update and jquery 1.1.3 (packed) dropped into /misc. I get and error:

'jQuery.easing[e.easing] is not a function
http://opus.activestate.com/drupal5/misc/jquery.js
Line 11'

...so it looks like there is an api change there.

#4

momendo - July 12, 2007 - 03:44

There's a big changeset that fixes these 1.1.3.1 issues in Drupal 6.0. It's possible to reverse the changes and backport to the drupal 5.1 JS files.

http://drupal.org/node/146462#comment-268382

#5

jjeff - July 12, 2007 - 14:56

Yes. Seems like most of the issues around this module have been related to collapse.js breaking.

Since the module already requires replacement of the core jquery.js file, I'm inclined to do the same for collapse.js, rather than trying to override it with our collapse-fix.js file.

Unless anyone has problems with this, I think this will be the route I pursue in the next update of this module (coming soon).

#6

momendo - July 12, 2007 - 21:01

Dries just committed the 1.1.3.1 edits to D6 core. Looks like it's good to go!

#7

dkruglyak - July 20, 2007 - 19:18

@jjeff: I suggest to consider collapse-fix.js route for those using JS aggregation patch in D5 (must have for sophisticated JS work)... In any case, let's try and get either approach commited to CVS soon...

#8

dkruglyak - July 28, 2007 - 23:00
Title:JQuery 1.1.3 Update» JQuery 1.1.3.1 Update

OK, I took a crack at the patch. Attached is the patch for the module itself, using jQuery 1.1.3.1 and removing collapse-fix.js to address the issues noted in the next comment.

AttachmentSize
jquery_update.patch42.56 KB

#9

dkruglyak - July 28, 2007 - 23:06

Per jjeff's suggestion here is the patch for /misc directory, updating both jquery.js and collapse.js. A few notes on what is in:

1) Backport of D6 patch of collapse.js
2) Includes JS syntax fixes to support JS compressor (including D5 backport)
3) Special hack for the issue where legend for open fieldsets does not appear in Firefox

The collapse.js patch does not work with collapse-fix.js is included, so this patch must be first applied to the module:
http://drupal.org/node/156221#comment-280894

AttachmentSize
misc_0.patch42.23 KB

#10

dkruglyak - July 28, 2007 - 23:08
Status:active» patch (reviewed & tested by the community)

Almost forgot - this is tested and ready to go!

#11

momendo - August 10, 2007 - 15:28

Excellent. Can we get the patch committed?

#12

btully - August 15, 2007 - 19:35

subscribe

#13

guardian - August 23, 2007 - 14:24

subscribing. got the above patches working.
does not seem to work well with the thickbox though :/ don't know which module to blame :)

#14

momendo - August 24, 2007 - 18:39

1.1.4 was just released.

#15

briwood - August 25, 2007 - 08:54

I think you can upgrade your site to 1.1.4 as follows. Don't do this unless you are prepared for the possibility of things breaking. That said, I have not yet noticed problems on my site...

1. install http://ftp.drupal.org/files/projects/jquery_update-5.x-1.x-dev.tar.gz
2. Untar and enable the module
3. in your modules dir:

wget http://drupal.org/files/issues/jquery_update.patch

4. in modules dir:

patch jquery.js jquery_update.patch

(output you should see)

(Stripping trailing CRs from patch.)
patching file jquery.js
(Stripping trailing CRs from patch.)
patching file jquery_update.module

5. cd to your misc directory:

wget http://drupal.org/files/issues/misc_0.patch

patch collapse.js ../modules/jquery_update/misc_0.patch

(output)

(Stripping trailing CRs from patch.)
patching file collapse.js
(Stripping trailing CRs from patch.)
patching file jquery.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file jquery.js.rej

Don't worry about the jquery.js error.

6. cp ../modules/jquery_update/jquery.js .

(note your paths might be different than mine.)

7. Goto Administer > Logs > Status Report and you should see

JQuery Update Installed correctly The current installed version of JQuery is 1.1.3.1

8. This is the brash part that (I think) upgrades you to 1.1.4 (Please correct me if you know better)

in your misc dir:

wget http://jqueryjs.googlecode.com/files/jquery-1.1.4.pack.js

9. mv jquery.js jquery-1.1.3.1.js
10. ln -s jquery-1.1.4.pack.js jquery.js
11. mv ../modules/jquery_update/jquery.js ../modules/jquery_update/jquery-1.1.3.bak.js
(these are my paths)
12. cp jquery-1.1.4.pack.js ../modules/jquery_update/jquery.js
13. Goto Administer > Logs > Status Report and you should see

JQuery Update Installed correctly
The current installed version of JQuery is 1.1.4

#16

momendo - September 1, 2007 - 11:48
Title:JQuery 1.1.3.1 Update» Upgrade to JQuery 1.1.4

Thanks for the info. I'm going to make a pass at changing this to 1.1.4 Me and a couple other commiters got Dries to upgrade to 1.1.4 in D6 head. This update is slacking behind unfortunately. :-( ::looks at Jeff Robbins::

#17

dkruglyak - September 1, 2007 - 19:28

Let's be careful about the methods deprecated in 1.1.4. We should be sure to update the compatibility library...

#18

momendo - September 1, 2007 - 21:34

It's a non-issue with regards to deprecated features. 1.1.3.1 saw most of the disruptive changes that those were fixed with the last update. http://drupal.org/node/170224

#19

DawnLight - September 16, 2007 - 06:32

WYMeditor 0.4 stable requires 1.1.3+. subscribing.

#20

jjeff - September 18, 2007 - 15:16
Title:Upgrade to JQuery 1.1.4» Upgrade to JQuery 1.2
Status:patch (reviewed & tested by the community)» active

Let's just jump right up to JQuery 1.2

Anyone want to roll the patch? (I'm removing the patch status on this issue since we don't have a working patch for any recent version of JQuery.

#21

Moxide - September 21, 2007 - 10:16
Title:Upgrade to JQuery 1.2» Upgrade to JQuery 1.2.1

Jquery 1.2.1, now ;-)

I'm working on this, but I'm facing a problem after the JQuery 1.1.3.1 upgrade step :
- The first time I click on a collapsed fieldset, it expands at once, without animating.
- Clicking again smoothly closes the fieldset.
- Clicking again smoothly expands the fieldset.
It occurs with both Firefox and IE7, WinXP.

Attached is a patch which applies to collapse.js, that fixes the problem for me.(roughly the same as the one I proposed earlier).

Can anyone confirm the problem ?

AttachmentSize
fix_collapse_js.patch481 bytes

#22

Moxide - September 21, 2007 - 10:31

Just checked collapse.js (ToggleFieldset function) in drupal6-dev : it removes the "collapsed" attribute before hiding the fieldset.
Since the above patch does the same, it should be pretty harmless.

#23

momendo - September 22, 2007 - 14:22

jQuery 1.2 will most likely break older modules that depend on 1.1 and will need the compat library. I don't think we will need it for now though. Maybe it makes sense to include the compat library in the module folder but don't add it to the JS at runtime?

#24

Moxide - September 23, 2007 - 17:29

I just tested Thickbox and JLightbox with Jquery_Update/JQuery 1.2.1.

Thickbox:

  • With compat-1.1.js only : TB login works, TB image doesn't
  • With compat-1.1.js and xpath.js : TB login doesn't work, TB image does
  • Without compatibility libraries : nothing works

Everything works with JQuery 1.1.4.

JLightbox :
It seems that it works with all configurations, whether the compat libraries are used or not.

Should we provide an option to let admin enable/disable compat-1.1.js and xpath.js ?

#25

dkruglyak - September 25, 2007 - 15:15

What are the real benefits in upgrading to 1.2.1 in 5.x?

Seems to me more work on backwards compatibility is needed, perhaps a custom compat library, at least to handle all Thickbox cases...

#26

momendo - September 27, 2007 - 01:57

This is backward thinking. Thickbox and all other modules that use jQuery need to be upgraded to be compatible with jQuery 1.2 Otherwise, don't upgrade jQuery and stick to your existing jQuery update.

#27

dkruglyak - September 27, 2007 - 02:31

Yes and this backward thinking is also known as backward compatibility.

It is not always possible to upgrade all the modules, especially in complex installs. There needs to be a proper compat library.

#28

bobdalob - November 14, 2007 - 12:03

subscribing

#29

Nimstad - November 14, 2007 - 12:17

Speed?

#30

sadeh - November 20, 2007 - 03:42

subscribing

#31

rconstantine - November 20, 2007 - 19:24

I put together a zip file of a complete set of files for a 1.1.3.1 version of this module. Included are the updated jquery.js and collapse.js files which should be copied to the misc folder. Seems there are necessary changes to many files for 1.1.4 to work, so I didn't tackle that. Bummer, since the speed enhancements are incredible.

Anyone back-porting the D6 changes to 1.1.4 to D5?

Rename file to end where the zip is. Sorry it isn't gzipped.

AttachmentSize
jquery_update-1.1.3.1.zip_.txt21.39 KB

#32

rconstantine - November 21, 2007 - 04:23

Was there an issue with this and the upload module? I can't seem to attach more than one document anymore. Did I just screw up somewhere in the upgrade? Or is it an new oversight?

#33

rconstantine - November 21, 2007 - 08:45

Nevermind. I'm an idiot. Apparently upload doesn't warn you that you've gone over your max upload amount and just dumps all files in your list. Is that right? Uploading several files under the max works fine. Seems like a UI oversight there, isn't it?

#34

momendo - November 21, 2007 - 23:01

I'd like to point out that there is a project that has jQuery 1.2.1 and jquery UI bundled up for D5.

http://drupal.org/project/jquib

#35

peterx - November 22, 2007 - 21:38

Are there many modules that use jQuery? I replaced the Drupal 5.2 jquery file with jquery 1.2.1 and everything works on my site without the compatibility file. Autocomplete works. My special conditional load javascript works. From what I can see, there are few 5.x modules that use jquery. If we install jquery 1.2.1 the same as Drupal 6 then the few modules that use jquery can be updated to 1.2.1 as a backport from updating the modules to 6.x.

Drupal beta 3 is out which means the final release is close. Module developers must be looking at updating their modules. Can we contact the developers of jquery dependent modules and ask them about their plans for Drupal 6 and a possible backport to 5.x? Perhaps Drupal 5.3 could be released as 5.4 with jquery 1.2.1 and all the jquery dependent modules could produce a 5.4 version for 1.2.1.

#36

rconstantine - November 23, 2007 - 02:22

Thanks for the info momendo. Trying to follow some of these threads is ridiculous at best. Getting to 1.1.3.1 was the farthest I could follow with a high degree of certainty. I'll look at the link you gave us.

As for backports to 5.x, I'm in favor of that, but don't think they'll do a 5.4 release for it. I think you're right that not too many modules use jQuery, but I'd like to start using it more. In fact, I would like to enhance all of my modules with jQuery where it makes sense and would improve users' experiences. I'd really like my own sites to be more desktop-like. I'll be starting several jQuery enhancements soon for all of my 5.x modules.

#37

peterx - November 23, 2007 - 03:15

A note on performance. jQuery is available as a small file requiring an eval() at the start and a big file without the eval(). I found the eval() a killer on some browsers on some computers. The large file was slower to download but the extra download time was less than the eval() time. The download occurs once then is cached while the eval() occurs every page.

For a Drupal 5.1 site, I produced an intermediate file that had all the comments and spaces removed but did not need an eval. The intermediate file was less than half the size of the full file and had no eval() delay at page startup.

#38

peterx - November 24, 2007 - 02:21

More on performance. jQuery is not needed for many home pages. My sites do not use jQuery until someone logs in. A tiny Javascript file is loaded on the first page and that function waits for onload then loads jQuery and tells the session that Javascript is in use. On subsequent pages, jQuery is already loaded in cache and used in the usual way. The first page load takes less time to be readable.

#39

bennybobw - November 29, 2007 - 02:01

It looks as though D6 is not going to be out for a couple of months, especially with Views 2 being where it is. So I think we should move along with this patch, especially given there are quite a few plugins that are now requiring the newer version of Jquery.
This thread is a little hard to follow, but I'm rolling a new patch based on what's happening.
It looks as though the patch in #21 is already existent in jquery updates fix-collapse.js, so it doesn't seem like it's needed...

AttachmentSize
jquery_update-1.2.1.patch47.28 KB

#40

bennybobw - November 29, 2007 - 02:02
Status:active» patch (code needs review)

Forgot to change status

#41

bennybobw - November 29, 2007 - 02:05

Sorry again
Patch applies to 5.x-1.x-dev

#42

ceejayoz - December 12, 2007 - 15:00

The patch in #39 works wonderfully for me. It even got WYMeditor 0.4 working in IE. :-D

#43

liquidcms - December 20, 2007 - 07:22

just a quick note.. i upgrade to js 1.2 with dr 5.3 a while back (needed it for some external code i added - plus all the docs on jq site were only for 1.2 and not very comp with 1.1)

things have been fine until i just realized the "select all" checkbox on the admin/content page is missing.. and sure enough.. its because of jq 1.2

but cant go back, tons of jq 1.2 code written .. so need to sort out how to get this working in dr 5

also, by collapse issue is this the fact that i usually dont see the fieldset titles (i.e. the selector to open/close fieldset) when i first go to page.. but if i pop firebug.. they re-appear???.. maybe this is a jq 1.2 issue as well???

#44

liquidcms - December 20, 2007 - 07:23

yup, seems to be.. with jq 1.1 back.. my collapse boxes work fine again.. of course most of my site is busted..lol

#45

bobdalob - December 20, 2007 - 11:02

I haven't tried any of the patches here.

I have however upgraded to jquery 1.21, with jquery update installed, (see here) and I have none of the issues except for the missing "select all" box (which I hadn't noticed until ptalindstrom mentioned it). There are certainly none of the collapse issues, sticky resizable text boxes or broken Thickbox image. The Status report reports v1.21 is installed correctly. Anyone else?

#46

magico - December 20, 2007 - 21:48

I'll test this because I also need WYMeditor 0.4

The problem will be convencing branch maintainers considering this a bug fix...

#47

dkruglyak - December 23, 2007 - 20:29

I made a patch for "select all" issue, based on 6.x thread: http://drupal.org/node/174708

Works fine for me, please report if you are having any problems.

AttachmentSize
tableselect.js_.patch570 bytes

#48

magico - December 24, 2007 - 11:09

Note: jQuery the following patch is a collection of several work done by others and by me.

Updates:

  1. jquery.js is now compound by jquery-1.2.1.js and jquery.compat-1.0.js. Probably this final final should be compressed without using the "eval" option (see here for more information http://www.codinghorror.com/blog/archives/001023.html that should also be applied to D6)
  2. textarea.js had a very small fix from http://drupal.org/node/118846
  3. collapse.js small fix from http://drupal.org/project/jquery_update
  4. tableselect.js fix from my colleague here
  5. autocomplete.js OK
  6. drupal.js OK
  7. progress.js OK
  8. upload.js OK

Political note: jQuery starts to be a so fundamental piece, that waiting 1 year just to get a new version of it along with Drupal, kills the dynamics of the work. Something must be done to ensure that jquery can be update as a normal Drupal component. We are not talking about new features, but fixes that allow 3rd party developers to create/use modules that use jquery.

AttachmentSize
jquery_121.patch104.17 KB

#49

magico - December 24, 2007 - 11:14
Project:jQuery Update» Drupal
Version:5.x-1.x-dev» 5.x-dev
Component:Code» javascript
Category:feature request» task

Changing bug report info, to reflect this position.

#50

momendo - December 24, 2007 - 15:49
Project:Drupal» jQuery Update
Version:5.x-dev» 5.x-1.x-dev
Component:javascript» Code
Status:patch (code needs review)» patch (code needs work)

-Don't usurp this patch for D5 dev! It's jQuery Update!
-jQuery JS must be compressed.

If you want to change D5, start a D5 jquery bug and be prepared to defend your edits.

#51

wazdog - January 10, 2008 - 02:51

magico's patch (#48) applies for me, and works perfectly. However, if there is no other way to do this than patching a bunch of core files, I can't see how this will work for most people.

I wholeheartedly agree that a way to update jQuery in between official releases is absolutely necessary. Maybe some type of hook system, or have Drupal handle dependancies by knowing which version of jQuery is necessary for certain code (and supporting multiple versions?). Or implement core jQuery as a module...

I'm just thinking out loud here, but I just had to hack in these patches, plus my own patches to thickbox (to up it to v.3.1, which was necessary for proper functioning on my site), and this was not fun. There has to be a better way.

#52

andrabr - January 12, 2008 - 20:12
Component:Code» Miscellaneous

Perhaps a patch of this magnitude justifies a new official version of the module... After all, how many people will track down all the way to the end of this discussion? (or am I missing something?)

#53

momendo - January 13, 2008 - 06:18
Component:Miscellaneous» Code
Category:task» feature request
Priority:normal» critical

D6 has the latest jQuery. Only D5 is outdated. If D5 core JS files need replacing, post a patch that has the replacement JS files. The README will also need to be updated. D5 core is locked feature wise. Thus the need for this update module.

#54

liquidcms - January 13, 2008 - 10:55

Yes, D6 has latest jQuery but isn't going to be ready for production for at least 4-6 months or so. A jq 1.2 update module for Dr5 would be great.

I am not sure but is this simply running the patch above on the existing code files and then tarring together? Although unlike php modules i guess this update module would require coping over all the included js files into /misc ?

#55

magico - January 14, 2008 - 14:44

While using the jquery update modules implies both a module and patching, a combined patch is much more simple.
A well done patch, after good testing can be used to apply to a clean drupal 5 release and everything will be fine.

#56

doc2@drupalfr.org - March 12, 2008 - 14:36

Please do so... I read all of this.

This is a nightmare, as each time I got back here, I couldn't get something working properly or without "scary" caution advises.

I'll try the latest solution anyways. Question: Is #48 for 5.x-dev or 5.x-1.0? Is it supposed to be applied to the .module file or the .js (seems to be the latest. I ask because sometimes automatic patching still asks for a file)?

#57

doc2@drupalfr.org - April 4, 2008 - 08:45

Finally, I applied #48 on a non clean 5.3 drupal install. All files intended to be patched from the misc/ directory (EDIT: precision under comment #67) were patched successfully except from the main jquery.js file, which is the only one to get a 1 out of 1 hunk FAILED -- saving rejects to file...

I tried it for you, none of the jquery.js file from the 5.x-1.0 or the 5.x-dev release (19-06-2007), will make it. For the #48 patch, you need to use the jquery.js file originaly provided by drupal in its misc directory (as of drupal 5.7, the jquery.js file is still dated from 2006!).

If you use the jquery_update.module (you should enable it only if you do need it), you'll have to copy your jquery.js file FROM the drupal/misc folder TO your jquery_update module folder (either in drupal/modules or drupal/sites/all , etc). If you don't, you'll get a minor status report error, if you do, you'll get a very satisfying

JQuery Update Installed correctly
The current installed version of JQuery is 1.2.1

Thank you dear drupalers, Greetings, Arsène

Bonus for beginners: http://drupal.org/patch/apply :)

#58

doc2@drupalfr.org - March 12, 2008 - 17:55

As it's working for me, I give +1 in favour of a "Patch (code need review)" status. Drupalers, don't hesitate to review it as well, and comment here.

As I cannot examinate the code myself, I cannot tell whether it needs work or not. That is why I haven't changed the status.

#59

meeotch - March 13, 2008 - 01:30

Thanks for the n00b patching link. I've successfully installed this patch with drupal 5.7, and enabled the jquery_update module (Imagefield Gallery with Lightbox2 depends on it), and everything seems to be working fine...

...except for the Dependent Fields module, which is a module that collapses & hides cck fields based on the status of a "parent" checkbox field in the form. Any tips for what sort of jquery 1.2.1 stuff might be breaking it would be greatly appreciated, as I'm also a total jquery n00b. (Contact me directly, if it's inappropriate to respond in this node.)

#60

magico - March 13, 2008 - 09:56

The patch should be applied to D5.7 and it only modifies .js files. Also, there is no need to install jquery_update... just that simple patch...

#61

darkpollo - March 13, 2008 - 19:53

Hi.
I am new on drupal. I do not understand how to install the patch 1.2.1 to make it work on my drupal.
Could anyone help me?

I undertand i need to download the jquery update and replace the misc folder with comething, but i am not sure where to download the jquery.js to replace the original.
Thanks!

#62

doc2@drupalfr.org - March 14, 2008 - 11:38

darkpollo: be patient, and read all this post.

As said by magico in #60, you don't need the jquery_update.module to have the jquery library (that is to say the jquery.js file from the drupal/misc folder) updated.
The only cases you may need the jquery_update.module are if, and only if, you're using some dependent contributed module, such as Lightbox V2, or any other which checks for it. *But* you should first try to update the jquery.js file with the jquery_update.module and all dependent modules disabled.

The jquery_update.module doesn't garantee you to automatically have the latest jquery library anymore...
Explainations:

Indeed, the jquery library is a third party contribution which has been made part of the drupal core project since a long time, but not as a module. The jquery contribution has been put into the drupal/misc folder, which doesn't benefit from the 'module update process'.

    The update_status.module (which is optional in drupal 5 but a core feature in drupal 6) allows you to know regularly and automatically thanks to your cron settings if a module has a new release. But as it relies on the 'module update process', it only checks for module updates, and therefore the jquery contribution, in the drupal/misc folder, wouldn't be taken in account.
    Note: the update_status.module doesn't update your modules automatically in drupal 5, it only checks for updates.

If I get it right, what the jquery_update.module intended to do was to benefit from this 'module update process' to help drupalers to upgrade their jquery library. The idea was that updating the jquery_update.module would trigger its main function of comparing the date/version of the jquery.js file from the drupal/misc folder to the one it contains. To do so, each release of the jquery_update.module was supposed to always carry the latest drupal suitable version of the jquery.js file. So that upgrading the jquery_update.module (thanks to the notice of the update_status.module) would always check the drupal/misc folder to see if it's containing this latest version of jquery. If not, you'd just have to copy the latest version of the file from the jquery_update.module folder to the drupal/misc folder.

But there, two problems:

  1. The jquery_update.module hasn't been much developed and/or no new release happened. On the other hand, the development of drupal 5 never included the latest version of the jquery.js file in core (in drupal/misc). You would therefore always have to udpate their misc/jquery.js file by yourself.
  2. As a consequence of manually updating the misc/jquery.js file yourself, *if*, and only if, there was/is a need for the jquery_update.module, you had/have to copy the most recent jquery.js file from the misc folder to the the jquery_update.module folder, in order to have the same jquery.js file in both. Otherwise the module (recall: supposed to always bring the latest version of the jquery.js file) would tell you it isn't up-to-date (while/because outdated) and would ask you for "updating".

  3. The javascript instructions in drupal not only rely on the jquery library but as well on other files from the drupal/misc folder. These files aren't checked (as far as I know) by the jquery_update.module, but as magico pointed them out in comment #48, they need some fixes too.
  4. As a consequence, if you want to update the main javascript instructions in drupal (5.x), keep in mind that not only the jquery.js file is concerned, but other files such as the ones in #48. These all are in the drupal/misc folder.

      This is why the patch from #48 should be put into and run from the drupal/misc folder where the files to be patched must only be the ones originaly provided by drupal (cf.: my comment #57)

Using the patch from #48

    When you run the patch (according to http://drupal.org/patch/apply), you will be asked for a file to patch, one after another. Indeed, this single patch has been made for patching all the .js files (bravo :). But patching many files with a single patch is not a normal procedure and therefore you should consider errors are normal, as long as you're being asked for another .js file from the drupal/misc folder to patch. But...
    ... watch out! This normal error might hide another real error. Therefore be sure to check each time if you get *before* this 'normal' error another error such as 1 out of 1 hunk FAILED --(...) (this is for the Mac OS X Terminal at least) for the file you just tried to patch.

Once you've patched all the files, you'll know it: no more error shows up, but (for the Mac OS X Terminal at least) a

JQuery Update Installed correctly
The current installed version of JQuery is 1.2.1

Once this done, *if* and only if you need the jquery_update.module (see above), remember to copy the single drupal/misc/jquery.js file TO the jquery_update.module folder. If you don't need the jquery_update.module, disable it.

Sorry for the heavy redondant style, but I stress on the idea that always naming what we're talking about helps avoiding confusion. It's therefore a bit longer and boring, but if you take your time, it should have a better understanding. Otherwise, let me know!!!

Hope this won't decourage anyone. This should help indeed!

#63

doc2@drupalfr.org - April 4, 2008 - 08:53

EDIT: the patch works fine when used on drupal's original .js files *and* when using most recent browsers (on Mac OS X).

    By the way, I wonder: Wouldn't the jquery 1.2.1 upgrade imply that contributed modules upgrade to it? In this case, they should be a kind of huge drupal 5.x javascript campaign to upgrade all as soon as possible, so that everyone could contrib and the effort be mutualised

Cheers

#64

subru77 - March 28, 2008 - 20:57

Once I update the patch the jquery.js file become 80KB. How do we change the file to compressed version of jqery ?

#65

meeotch - March 28, 2008 - 21:23

subru77 - google "jsmin". Squashes it down to about 47k. (Still more than twice as big as the stock jquery - not sure if other methods would do better.)

#66

magico - March 29, 2008 - 13:45

Just a note about "compacting" javascript: I personally hate it! I just activate my server gzip compression, and let the system take their natural courses.

Javascript "compacting" increases a new layer, that turns the system slower and harder to maintain.

#67

andjules - April 2, 2008 - 21:46

just in case it helps someone... in post #57, the author mentions (re: the 'misc' directory):

this is where to patch from and therefore where you should copy your patch

just to be clear, you put the patch in the 'misc' directory, but from the commandline, you start in the root drupal directory and run
patch -p0 < misc/jquery_121.patch

#68

subru77 - April 3, 2008 - 18:50

Thanks for the reply

#69

guardian - April 15, 2008 - 09:25

i would love to see a new dev release of the module that provides what can be applied from this page.
also would it be hard to evolve this feature request to "Upgrade to JQuery 1.2.3" ?

#70

Steve McKenzie - April 30, 2008 - 18:40

if going to 1.2.1, 1.2.3 would work fine.

why cant this patch get committed ?

can't you just steal whats in core 6.x and make it work fast and commit?

#71

Steve McKenzie - May 1, 2008 - 17:31

im going to jump on this issue.

im hoping to get something together sometime today but if not, tomorrow for sure!

I want to see 1.2.3!

#72

jjeff - May 1, 2008 - 19:03

Steve is now a co-maintainer of the module. Hopefully things will get unstuck now.

Thanks Steve!

#73

Steve McKenzie - May 1, 2008 - 23:32
Title:Upgrade to JQuery 1.2.1» Upgrade to JQuery 1.2.3

Attached is the proposed version 2.x of jquery_update.

Please review and fully test.

I have upgraded jquery to 1.2.3 and have reviewed the patches that went into Drupal 6.

The route I have gone with is to just replace whatever files we need to in misc/ .

The facts are that if you want jquery 1.2.3 in Drupal 5, don't expect to not have to at least follow a few steps. Such is life.

So I have updated the readme file with a bit of a better explanation as to what to do and also cleaned up the file structure of the module to hopefully make this a bit easier for everyone?

"3) Copy all js files from the jquery_update/misc folder and place them in Drupal core's misc/ folder replacing the files
that already exist."

I am not the best person to write documentation so if anyone has any complaints / suggestions, let me know.

Files that need to be replaced:
- jquery.js
- collapse.js
- tableselect.js

TEST TEST TEST people! Let's get this committed fast!

#74

Steve McKenzie - May 1, 2008 - 21:44
Status:patch (code needs work)» patch (code needs review)

wtf? i so did not attach that file. lol

AttachmentSize
jquery_update-2.0.tar_.gz19.86 KB

#75

Steve McKenzie - May 2, 2008 - 21:35
Status:patch (code needs review)» fixed

http://drupal.org/node/254091

New branch. I'm a cvs noob. I owe it all to WimLeers for this release. Thank you for your help lol!

DRUPAL-5--2-0-BETA is really the same as DRUPAL-5--2-0-BETA-2. The difference is the no longer needed files are removed in BETA-2. That was part of the cvs noobness I had :)

#76

brainchild - May 11, 2008 - 16:31
Version:5.x-1.x-dev» 5.x-2.x-dev
Category:feature request» bug report
Status:fixed» active

Hi,

after making an upgrade of jQuery and trying to use previously worked functionality with file filed supporting multiple values it stopped working. it looks so - Browse->Select a file - > Upload file. Progress indicator appears and file shows as uploaded. After that trying to upload the next file gives all files disappeared and the next error message ('f is not a function in jquery.js line 11'). jQuery is packed. Drupal 5.7.

It looks like a bug with support of multiple values after jQuery update.

Thanks,
Alex.

#77

WorldFallz - May 14, 2008 - 15:34

installed & tested current dev on a fresh 5.7 install.

Results so far:

1) still have minor bug from comment 21: collapsible fieldsets open immediately the first time (no slide), but then function fine afterwards. Seems to be just the first time on the page-- not the first time on each individual fieldset.

2) same bug as comment 76: second file upload fails with same error.

#78

Steve McKenzie - May 14, 2008 - 18:01

cannot reproduce from comment 21 but can produce #76.

patches welcome :P

#79

WorldFallz - May 14, 2008 - 20:22

I'm no js/jquery jockey but I did take a look--- couldn't spot anything obvious. doesn't mean it's not trivial-- just that i couldn't see it (which is not saying much, lol).

#80

katbailey - May 19, 2008 - 20:31

I had the exact same issue as comment #21 and fixed it with the attached patch. I have seen this type of bug before which seems to be a general problem of trying to alter the css properties of elements when those properties have no initial values. This patch sets the initial css values of height and display for the collapsed fieldset-wrapper elements so that the animations work properly on them from the outset.

AttachmentSize
jqupdate.collapse.js_.patch332 bytes

#81

katbailey - May 19, 2008 - 21:28

The problem in #76 seems to be caused by the 'last-of-type' selector expression used in upload.js. This is now listed under the "not supported" selector expressions in the jQuery documentation so it must have been deprecated since 1.0. If you change the two instances of tr:last-of-type in upload.js (lines 77 and 90) to tr:last-child, the file upload works perfectly for first and all subsequent uploads.
So, I guess the question is, do we need to add a new version of upload.js to the jquery_update misc directory?

#82

WorldFallz - May 20, 2008 - 03:23

tested katbailey's 2 fixes in #80 & #81-- both work and fix their associated problems with no errors (THANKS KAT!). I tried to reroll a complete patch against the current DRUPAL-5--2 branch, but I can't figure out how to get diff to add the upload.js file in /misc. "cvs diff -uRN" isn't doing it.

#83

doc2@drupalfr.org - May 20, 2008 - 08:48

Thank you so much KAT! I'm so impatient to see this commited...

So Joann, good luck for commiting! Experimented people around here, please help her (I wish I could), the JQuery case deserves it!

Best regards,

Arsène

#84

WorldFallz - May 20, 2008 - 15:27
Status:active» patch (code needs review)

OK, I figured out what I was missing to add new files to a patch. Here's a new patch rolled against current DRUPAL-5--2 branch incorporating both of katbailey's fixes. haven't found any other problems yet, seems stable so far.

AttachmentSize
jquery_update_v2dev.patch4 KB

#85

subru77 - May 20, 2008 - 17:14

I tested the updated module. Everything was fine except CCK Field Group Tabs went missing. Did anyone come across such a situation ? I found it strange

#86

WorldFallz - May 20, 2008 - 17:59

Where? You mean when you editing a content type? Mine appear to be working correctly...

#87

dkruglyak - May 20, 2008 - 19:12
Title:Upgrade to JQuery 1.2.3» Upgrade to JQuery 1.2.4
Status:patch (code needs review)» patch (code needs work)

The latest version just got released with bugfixes and we ought to upgrade and re-test:
http://docs.jquery.com/Downloading_jQuery

#88

doc2@drupalfr.org - May 21, 2008 - 12:52

Or maybe one thing at a time, especially if (ever) 1.2.4 brings no bug fixe. Getting 1.2.3 to work was kind of painful in terms of time spent and waited, and there still has neither been a stable release for while, nor for the jquery_update_v2 module.

This is not pure criticism just claim for the need of a single stable release that any drupaler, nOOb or pro, could install easily and use without fears.

Please, release a stable version before upgrading, unless you know it'll be easy and quick to upgrade to this 1.2.4 version.

Huge thanks anyways for all your work!

#89

WorldFallz - May 21, 2008 - 13:23

I tend to agree with doc2, however the to go from the original version of jquery in drupal to 1.2.3 was a far larger jump than 1.2.3 to 1.2.4.

I've replaced the jquery.js file with v1.2.4, and so far I haven't encountered any problems. However, I haven't had a chance to load up panels and some js heavy panel styles yet (like tabs or carousel) or of the other other js heavy modules. If anyone has such a site already, it would be really helpful if they tested it.

#90

WorldFallz - May 21, 2008 - 14:55

OK, I've had a chance to do some more testing (both with 1.2.3 and 1.2.4). Panels 2 UI seems to be working fine, but panel styles other than default, list, and rounded corners (in other words, the js heavy ones) cause the display to vanish. Also, collapsiblock from jstools doesn't work. Hierarchical Select v2 seems to be ok.

#91

dkruglyak - May 21, 2008 - 16:12
Title:Upgrade to JQuery 1.2.4» Upgrade to JQuery 1.2.5

@doc2: You are partially right, jQuery team just had to replace 1.2.4 as a bad build.

However 1.2.4/1.2.5 has NO new API changes, only accumulation of bugfixes. So if anything this should help us debug to the latest and greatest without too much risk. Please take a look at release notes:
http://docs.jquery.com/Release:jQuery_1.2.5
http://docs.jquery.com/Release:jQuery_1.2.4
http://dev.jquery.com/report/27

#92

meeotch - May 21, 2008 - 18:01

Throwing in my own $.02, in case it helps: I've recently noticed that Tabs and Carousel are broken, to different extents, in both IE6 and Konqueror. See the thread here: http://drupal.org/node/259741

I'm not sure if Wim is using an updated jquery on his demo site, but it sounds like he could use the help debugging it, if anyone from this thread spots a fix.

Sorry for muddying the thread, if this turns out to be an unrelated problem - but it would be great to have Tabs/Carousel/jQuery update all playing nice together.

#93

subru77 - May 22, 2008 - 18:18

@#85 & #86 Magoo has reported the same issue http://drupal.org/node/261409

#94

katbailey - May 23, 2008 - 06:47

@#85 This problem has to do with the context parameter being passed in to the tabs behavior function - instead of the context being passed in (i.e. document), the entire jQuery object is getting passed. I managed to fix it in jstools.js by changing this code at line 233

  $(document).ready(Drupal.attachBehaviors);

to
  $(document).ready(function(){
    Drupal.attachBehaviors(this);
  });

which is actually how it's done in drupal.js in D6.
Possibly something similar is causing the problem with the Panels displays but at this stage we need to think about how to deal with contrib module conflicts in general. For the above, I will test to see if the revised code works fine without jquery_update, and then there may be a case for submitting a patch to jstools, otherwise I'm not sure where this leaves us.
Thoughts?

#95

WorldFallz - May 23, 2008 - 15:08

WTG Kat! Since the tabs panel style depends on the jstools tabs component, it seems your fix has fixed it in panels also. Carousel style for panels also appears to be fixed as does collapsiblock from jstools.

Question is, does committing this change to jstools break backward compatibility and thus require a new branch for jstools? I tried it on a d5.7 site with the current recommended release of jstools (both with default drupal 5.7 jquery and jquery_update v1x) and it doesn't seem to break anything.

I've submitted a patch to the jstools issue for jquery update. If anyone else can test & post back results that would be great. If all is fine, hopefully the jstools maintainers will consider committing it.

As for other contribs, I guess we just take them one at a time. Hopefully this takes care of most of the more common ones in use.

#96

dkruglyak - May 23, 2008 - 16:16

FYI, more on upgrade to jQuery 1.2.5 in D6/D7 branch: http://drupal.org/node/256285

#97

katbailey - May 26, 2008 - 08:09

Thanks for testing the fix and submitting the patch Worldfallz :-)
However, I'm afraid there's a problem with it, which I've explained on that thread (see here).
Also, looks like jquery 1.2.6 is out already! http://docs.jquery.com/Release:jQuery_1.2.6

#98

WorldFallz - May 26, 2008 - 18:18

and thank you for following up on this--- while we wait for an answer in the jstools issue, i'll test out v1.2.6.

#99

WorldFallz - May 26, 2008 - 18:41

ok, v1.2.6 doesn't seem to break anything. Also, some more weirdness-- I was able to fix the collapsible fieldset problem by changing the fix in #80 from display: 'none' to display: 'inline'

#100

katbailey - May 26, 2008 - 19:14
Title:Upgrade to JQuery 1.2.5» Upgrade to JQuery 1.2.6

yay - comment #100
:-P

#101

doc2@drupalfr.org - May 27, 2008 - 08:51

Yay, well. I hope we won't get to #200 without a release! Any idea of which stable release will be out? And when? Could there be a kind of timeline?

I feel so confused between so much evolution there, so much involvment here, and my own impatience...

#102

subru77 - May 27, 2008 - 19:50

Thanks Kat! (#94) It works for me :)

#103

sun - May 29, 2008 - 15:44
Category:bug report» task
Status:patch (code needs work)» patch (reviewed & tested by the community)

+1
Let's create a jquery_update 2.0, or at least 2.0-RC1 release. Will lead to more testers. *And* I am able continue to develop jQuery UI for Drupal 5 (the successor of all existing jUI modules).

#104

katbailey - May 29, 2008 - 17:15

+1 to that idea
The patch in #84 fixes the collapse and upload issues - if it gets applied and the jquery version gets replaced with 1.2.6 then it would seem that the only thing outstanding is the jstools issue, which can only be fixed on their end.

#105

sun - May 29, 2008 - 18:46
Assigned to:Anonymous» sun
Status:patch (reviewed & tested by the community)» patch (code needs work)

I'll post a cleaned-up patch shortly.

#106

sun - May 29, 2008 - 19:12
Assigned to:sun» Anonymous
Status:patch (code needs work)» patch (reviewed & tested by the community)

This is RTBC now.

AttachmentSize
jquery_update-DRUPAL-5--2.patch72.42 KB

#107

katbailey - May 30, 2008 - 15:33
Status:patch (reviewed & tested by the community)» patch (code needs work)

Sorry all, but there was a problem with my collapse.js patch which was in fact causing the problem I mentioned here, I had it completely wrong :-(
The new line in collapse.js should be

$('fieldset.collapsed > div.fieldset-wrapper').not(':has(div.fieldset-wrapper)').css({height: 'auto'});

i.e. without "display: 'none'".
My patch-rolling skills aren't quite up to speed yet but I'll try and have a go later on, unless somebody else has a chance to do it.

#108

sun - May 30, 2008 - 15:40
Status:patch (code needs work)» patch (reviewed & tested by the community)

Re-rolled patch with Kat's change in #107. Now, let's get this sucker in.

AttachmentSize
jquery_update-DRUPAL-5--2.patch72.43 KB

#109

sun - May 30, 2008 - 19:12

Re-rolled patch with this change to collapse.js:

      fieldset.filter('.collapsed').children('.fieldset-wrapper')
        .css({height: 'auto', display: 'none'});

Please note, that all remaining bugs are caused by jstools' collapse.js. See #171234: Make Tabs dependent on Jquery Update for further information.

AttachmentSize
jquery_update-DRUPAL-5--2.patch72.44 KB

#110

katbailey - May 30, 2008 - 20:34

so my "fix" above wasn't really fix - it reverted back to the bug in #21. So I went with WorldFallz's suggestion in #99.
Discussed with sun on irc the idea of getting jstools to change (or remove) its collapse.js file as it's what's causing the conflict and it seems like an unnecessary duplication of misc/collapse.js

Anyway, I finally figured out how to roll the full patch ;-) - this one also puts upload.js in the misc directory
Hopefully this is the one!

AttachmentSize
jquery_update-DRUPAL-5--2.patch72.73 KB

#111

noahb - May 30, 2008 - 21:04

I'd like to test this one out, but I'm not sure how to apply a patch like this that has changes to both core and contrib directories.. My jquery_update is currently under sites/all/modules/jquery_update and if I apply the patch in that directory, the changes to the /misc directory don't a