Comments

Title:JQuery UpdateJQuery 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.

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.

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.

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

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).

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

@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...

Title:JQuery 1.1.3 UpdateJQuery 1.1.3.1 Update
StatusFileSize
new42.56 KB

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.

StatusFileSize
new42.23 KB

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

Status:Active» Reviewed & tested by the community

Almost forgot - this is tested and ready to go!

Excellent. Can we get the patch committed?

subscribe

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

1.1.4 was just released.

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

Title:JQuery 1.1.3.1 UpdateUpgrade 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::

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

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

WYMeditor 0.4 stable requires 1.1.3+. subscribing.

Title:Upgrade to JQuery 1.1.4Upgrade to JQuery 1.2
Status: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.

Title:Upgrade to JQuery 1.2Upgrade to JQuery 1.2.1
StatusFileSize
new481 bytes

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 ?

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.

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?

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 ?

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...

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.

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.

subscribing

Speed?

subscribing

StatusFileSize
new21.39 KB

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.

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?

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?

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

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.

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.

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.

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.

StatusFileSize
new47.28 KB

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...

Status:Active» Needs review

Forgot to change status

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

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

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???

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

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?

I'll test this because I also need WYMeditor 0.4

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

StatusFileSize
new570 bytes

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.

StatusFileSize
new104.17 KB

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
  9. 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.

Project:jQuery Update» Drupal core
Version:5.x-1.x-dev» 5.x-dev
Component:Code» javascript
Category:feature» task

Changing bug report info, to reflect this position.

Project:Drupal core» jQuery Update
Version:5.x-dev» 5.x-1.x-dev
Component:javascript» Code
Status:Needs review» 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.

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.

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?)

Component:Miscellaneous» Code
Category:task» feature
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.

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 ?

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.

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)?

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 :)

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.

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.)

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...

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!

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!

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

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

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.)

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.

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

Thanks for the reply

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" ?

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?

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!

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

Thanks Steve!

Status:Needs review» Needs work

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!

Title:Upgrade to JQuery 1.2.1Upgrade to JQuery 1.2.3
Status:Needs work» Needs review
StatusFileSize
new19.86 KB

wtf? i so did not attach that file. lol

Status:Needs work» 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 :)

Version:5.x-1.x-dev» 5.x-2.x-dev
Category:feature» bug
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.

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.

cannot reproduce from comment 21 but can produce #76.

patches welcome :P

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).

StatusFileSize
new332 bytes

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.

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?

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.

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

Status:Active» Needs review
StatusFileSize
new4 KB

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.

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

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

Title:Upgrade to JQuery 1.2.3Upgrade to JQuery 1.2.4
Status:Needs review» Needs work

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

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!

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.

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.

Title:Upgrade to JQuery 1.2.4Upgrade 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

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.

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

@#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?

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.

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

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

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.

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'

Title:Upgrade to JQuery 1.2.5Upgrade to JQuery 1.2.6

yay - comment #100
:-P

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...

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

Category:bug» task
Status:Needs work» 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).

+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.

Assigned:Unassigned» sun
Status:Reviewed & tested by the community» Needs work

I'll post a cleaned-up patch shortly.

Assigned:sun» Unassigned
Status:Needs work» Reviewed & tested by the community
StatusFileSize
new72.42 KB

This is RTBC now.

Status:Reviewed & tested by the community» 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.

Status:Needs work» Reviewed & tested by the community
StatusFileSize
new72.43 KB

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

StatusFileSize
new72.44 KB

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.

StatusFileSize
new72.73 KB

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!

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 apply, and if I do the reverse (apply from the misc directory) the changes to the jquery update module don't apply..

I also tried breaking the patch up bit by bit, and most didn't apply cleanly, so I thought I'd ask for some guidance.

StatusFileSize
new72.44 KB

Updated my last patch to use display: inline instead of display: none (as mentioned in #99).
Only difference to Katherine's patch in #110, and my in #109 thus is:

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

Just tested #112. Collapsing fieldsets work fine with and without jstools module enabled. Upload works fine.
I believe this is RTBC

Status:Reviewed & tested by the community» Fixed

Committed, yay!

Holy smokes, i leave to drive home from work and poof! This gets tested AND commited! WTG--- thanks guys, this was disparately needed.

Status:Fixed» Reviewed & tested by the community
StatusFileSize
new362 bytes

Hold on, people. There is one missing fix we need to commit (also attached):
http://drupal.org/node/156221#comment-668998

I also suggest that the distribution of this patch does not ONLY provide raw *.js files and provide a *,patch file against latest D5.7. Sometimes people have to mix different patches and it is best is to include a full diff/patch file for easier quality control.

Status:Reviewed & tested by the community» Fixed

No, we do not need to replace textarea.js with a patched version, because compat.js already takes care of this.

If you want to provide convenience patches, please file a new feature request. This one has been fixed.

Why use a 2KB plugin for compatibility instead of a 50 bytes line fix?

Please don't hi-jack this issue. Removing compat.js is a completely different feature request and has to be tested thoroughly. If you are interested in removing it, head over to #264959: Remove superfluous compat.js, read the given guidelines, test, and report your test results.

Thanks,
Daniel

Version:5.x-2.x-dev» 6.x-1.0

How about updating jquery in drupal 6 to 1.2.6?

Status:Fixed» Active

Version:6.x-1.0» 5.x-2.x-dev
Status:Active» Fixed

@mfer: That's a different topic and involves creating a 2.x branch for D6 as well as testing of a lot of other functionality. Please open a new issue.

whoo hoo.. finally.. JQ 1.2 in Dr5.. great work gang.

I am just installing now and will post test results:

- minor point but: module description in info file states: "Updates Drupal to use the latest version of jQuery." which is relatively silly and also incorrect - it should likely state something like "Updates Drupal to use version 1.2.6 of jQuery."

- tested collapsible fieldsets, checkall and a couple other things - all look great

One of the projects i work on is a very large site owned by the NY Times and i have been hoping to get jq 1.2 on there for a while now. I'll push for this our next release and let our gang of developers go at it with more testing. Should go into our next release which will be next week and will post back any issues here shortly afterwards.

Yeaaa baby!!!

Peter,

it should likely state something like "Updates Drupal to use version 1.2.6 of jQuery."

Actually, I will work on support for /any/ jQuery version. Anyway, this would have to be changed far too often (and would probably be forgotten to update).

If you'll find related bugs due to this update, please create new issues for them.

This issue is fixed.

Status:Fixed» Needs work

Have you been able to fix the broken farbtastic in IE with 1.2.6???

Status:Needs work» Fixed

EXCUSE ME BUT WHICH PART EXACTLY DON'T YOU UNDERSTAND IN "This issue is fixed, please open a new issue" ?

This issue was about organizing the effort to make the jQuery Update module live again and try to upgrade to recent jQuery version. Now, every bug introduced by the latest patch deserves to have its own issue.

Status:Fixed» Needs work

No, I didn't test that.

=> We definitely need a test plan.

I guess, no one cares about IE + Color module. Maybe that's the difference to core. The color picker in Color module is an admin-only feature, and I'd say that most, if not all, site admins are using better browsers than IE.

I'm tempted to mark this fixed again. However, I'll give others some time for responding.

If we could fix this here we are able to bring the fix back to D6 core what would help us all... that's why i asked here as there seem to be many subscribers... here is a testplan http://groups.drupal.org/node/5974#javascript

Status:Needs work» Fixed

jQuery Update issue: http://drupal.org/node/265644
Drupal 6 core issue: http://drupal.org/node/256285

The big roadblock, at this point, seems to be farbtastic in IE. That needs to be fixed.

Ow to fix is not clear at all for end users. Don't blame the hijackers. I followed the whole thread but I can't tell which patch to use on which module package.

Issues would be consistent if they were affiliated to a new (stable-stated) release, not to another issue on a single dev release (which is so confusing). And no matter about a browser as unrespectful as IE... (some SPIP-cms devs just ban it).

Please commit a stable release if you want proper test and reviews...

Best regards

Well, you should have looked on the project page in front of proposing a new release:
http://drupal.org/project/jquery_update

In the meanwhile, mfer has been working hard on the farbtastic IE issue for D6. I would like to encourage *everyone* from this issue to head over to #256285: jquery.js: Fix CVS ID, remove SVN tags and test the patch there, using the test plan at http://groups.drupal.org/node/5974#javascript

Thanks

Status:Fixed» Needs work
StatusFileSize
new8.95 KB

farbtastic.js (color module) is broken with the update to jquery 1.2.6. Should an updated farbtastic be included with jquery_update? I attached an updated farbtastic.js file that should work for drupal 5. I tested it in IE6 and FF2 but it's the same fix that's been tested against drupal 6 heavily. It should be placed in /misc/farbtastic/

With so many changes in this update we need to distribute a proper .patch file.

These replacement .js files floating around are unmanageable.

Status:Needs work» Needs review

The problem with patch files is that it's easier for many people to just replace core js files rather than use a patch. I'm looking forward to a better method in D7.

@dkruglyak: You can create patches if you like patches more than file replacements. However, AFAIK, no other Drupal module provides JS file replacements for Drupal core. Anyway, you have both the original file and the patched ones in jquery_update's misc/ subfolder.

@mfer: Thanks for pushing this issue!

I need at least one other confirmation that farbtastic works with patch in #133 in IE, and does not break other browsers (other than Opera 9.27, as already mentioned in the core issue).

Status:Needs review» Needs work

@mfer: Replacing core files willy-nilly is a sure way to turn your installation into a mess.

Patch files are critical to keep tabs of what exactly was changed (which lines of code). Replacement .js files can be provided too.

Marking "needs work" to roll a patch file.

@sun: The needs to modify core JS arise aside from released modules. This is not a reason to cut corners on packaging changes to core.

Status:Needs work» Needs review

Sorry, this is not core. You can create a diff yourself, or just look into the Drupal core issue, where you'll find a patch.

This is a patch to core and poorly packaged one at that.

@dkruglyak, still, I think you are following-up in the wrong issue... this will be my last post on this topic.
[EDIT] Also, replacing the files in core is clearly documented in the README.txt.

Successful tests anyone?

@sun: I have tested the farbtastic patch with IE6 under D6 and it works.

I've tested mfer's new version of farbtastic.js in #133 in Drupal 5 on IE6 and it works perfectly

Sorry... i only just got a chance to test this now-- patch seems to be fine in ie and ff.

Does this work with JS aggregation turned on ? It is giving me errors.

@subru77: Could you please be more specific? What error occurs and since when? What happened?

@subru77 what version of drupal are you using? If it's drupal 5, how are you implementing js aggregation?

I use JS Aggregation module http://drupal.org/project/javascript_aggregator

The error is as follows.

In Jquery.js
missing } after property list
[Break on this error] rd:null,accepts:{xml:"application/xml, t...){}if(s.beforeSend&&s.beforeSend(c,s)===
In Panels.js
Drupal is undefined
[Break on this error] Drupal.Panels = {}; //Line 3

@subru77: Are you using the latest official Panels 2 release? If not, please upgrade first. If you already are, please try the patch in #232099: Add Pane Popup Not Working.

Status:Fixed» Needs review

I am seeing errors on pages where there are no Panels. The errors show up for lightbox, jquery etc. Are you saying that these errors are due to the panels bug ?

Below are the console messages from Firebug. I didn't realize that I was seeing the errors even without aggregation turned on .. :((

Jquery.js

test for equality (==) mistyped as assignment (=)?
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
jquery.js()()
anonymous function does not always return a value
[Break on this error] n h.apply(this,arguments)});g.data=e}var...rguments.callee.elem,arguments)});handle
reference to undefined property D.cache[a][d]
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)...r|serialize|pixelLeft'.split('|'),0,{}))
variable elt redeclares argument
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.js (line 11)
e()jquery.h...e.pack.js (line 14)
e()jquery.h...e.pack.js (line 14)
e()jquery.h...e.pack.js (line 14)
jquery.history_remote.pack.js()()jquery.h...e.pack.js (line 14)
[Break on this error] var elt = elt ? elt : document;\n
anonymous function does not always return a value
jquery.tabs.pack.js()()jquery.t...s.pack.js (line 1)
[Break on this error] {settings.initial=i;if(($.browser.msie||...cus();return false}})}if($.browser.msie)

drupal.js and jstools.js

anonymous function does not always return a value
return true;\n

autocomplete.js and Lightbox.js
anonymous function does not always return a value
}\n

EDIT: Sorry to have posted this big comment here. Thought I was helping :) My comment was duplicate of
http://drupal.org/node/278799
and the reason is this http://dean.edwards.name/weblog/2007/08/firebug-slow/

Status:Needs review» Fixed

Committed patch in #133 in preparation for the first stable release of jQuery Update 2.0.

Thanks all!

@subru77: Please try to disable other modules to find the offending module. I really don't think this is caused by jQuery Update. Aside from that, by following-up on this issue several nice people are notified and disturbed, so please open a new issue if you really really think that your bug is caused by jQuery Update (however, the chances for this are close to zero).

subscribe

Status:Needs review» Closed (fixed)

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

Thank you - #94 - !!!