Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to share my jquery_update Port to jQuery 1.5 with you.
As far as jquery 1.4+ takes JSON Validation into account you have to patch the common.inc in the /misc folder. Hopefully this will get changed in the next Drupal 6 Releases. Patch is included in the archive.
If you find any bugs, please feel free to leave a comment. jQuery 1.4+ contains too many changes/improvements to we do not want to work without.
Comment | File | Size | Author |
---|---|---|---|
#160 | jquery_update_deprecated_constant-1067290-160.patch | 557 bytes | bdlangton |
#158 | jquery_update_deprecated_constant-1067290-158.patch | 613 bytes | brandenlhamilton |
#156 | jquery_update-1067290-156.patch | 241.84 KB | brandenlhamilton |
#157 | jquery_update-1067290-157.patch | 241.9 KB | brandenlhamilton |
#155 | fix_fo_jQuery_1_7_remove_attr_disabled.patch | 12.44 KB | man-1982 |
Comments
Comment #1
fatcrobat CreditAttribution: fatcrobat commentedforgot to remove debug log line, fixed in the version below ;)
Comment #2
franzkewd CreditAttribution: franzkewd commentedsubscribe
Comment #3
klonosThanx mate! I will test this the very next time an opportunity arises.
PS: ...switching to 2.x dev branch since new stuff goes there ;)
PPS: Any chance of a 7.x port?
Comment #4
fatcrobat CreditAttribution: fatcrobat commentedI am not in d7 yet. Still to many modules haven't been updated or are still unstable/alpha.
Comment #5
klonos...btw, in the project's page it says that D7 core ships with jQuery 1.5. As far as I know:1. D7 final came out on Jan 05 while jQuery 1.5 was not released until Jan 31.2. According to this D7 core issue I was following, the latest jQuery that was included in D7 was 1.4.4: #944308: Update to jQuery 1.4.4
I guess what I'm trying to say is that I am pretty sure that D7 shipped with 1.4.4 and not 1.5 and that the statement on the project's page needs to be corrected....scratch that.
Comment #6
klonos...yep, /misc/jquery.js, line #4:* jQuery JavaScript Library v1.4.4
Plus /misc/ui/jquery.ui.core.min.js, line #4:* jQuery UI 1.8.7
...so not 1.8.9 as stated in the project's page....scratch that too. I just realized what It actually means: what is the jQuery versions one gets in the end once they have installed jquery_update. Perhaps the title instead of:
...it should be:
Comment #7
jmlavarenne CreditAttribution: jmlavarenne commentedThanks for this - I have a custom module for a client which incorporates the latest version of galleria, and that didn't work with jquery 1.3.2. There are also ajax views, which didn't work with JQuery 1.5.
With this, I got everything to work.
Of course nobody wants to hack core (because of the kittens) but in a tight spot this let me postpone all my problems until the next Drupal upgrade! Yeah!
I might look for a way to select which version of jquery to load depending on the current path, or just disabling the default jquery for some paths and loading 1.5 instead for just those paths.
Thanks again!
Comment #8
jmlavarenne CreditAttribution: jmlavarenne commentedSorry about changing the title - silly me.
Comment #9
jmlavarenne CreditAttribution: jmlavarenne commentedI think this breaks the update progress bars and wheels so that they never get notified of completion.I think this was just because I had not applied the patch to the prod server - seems good now!
Comment #10
LateNightDesigner CreditAttribution: LateNightDesigner commentedTried this but still see JQuery as 1.3.2 on the Status page.
Comment #11
fatcrobat CreditAttribution: fatcrobat commentedcleared caches and applied the patch including in this package?
Comment #12
LateNightDesigner CreditAttribution: LateNightDesigner commented@fatcrobat: Correct. The install insists on it being 1.3.2 :(
Running Drupal 6.20, Jquery UI is at 1.6 if that matters at all.
Comment #13
fatcrobat CreditAttribution: fatcrobat commentedMaybe got it installed twice, running on a multisite? there is no reason for this issue, because i replaced jquery 1.3.2 with 1.5. What does the page source code header tell you? What jQuery Version is loaded?
Comment #14
thulstrup CreditAttribution: thulstrup commentedIt's working perfectly except when running batch operations. The batch script fails because of these two error:
Comment #15
AlexisWilke CreditAttribution: AlexisWilke commentedI got the problem raised in #10, somehow. I use rsync to update my servers (man, that makes it easy!). Somehow the jquery.min.js was not getting updated. I had to touch the file in my SVN to get it to copy to the servers. Something to do with dates... probably because I first got version 6.x-2.x-dev then "applied" this .zip.
Also, in #1 the author of the patch says to patch common.inc in misc/..., it is under includes, of course.
Otherwise, it looks like it works.
Thank you.
Alexis
P.S. Also, I now did many upgrades on different sites and had no problems with the batch system as mentioned in #14. update.php uses the batch system quite a bit.
P.P.S. I also tried with Gallerix which uses the "normal" batch system to upload image files and zip packages. It worked just fine too.
Comment #16
bonobo CreditAttribution: bonobo commentedSubscribe
Comment #17
beckyjohnson CreditAttribution: beckyjohnson commentedThis worked great for me but it broke the front page and only the front page of my site. Running Drupal 6.20. Is there any other relevant info i can give you to help me figure out why this is happening? It's pretty weird. It looks like the js files are loading too..
Becky
Comment #18
fatcrobat CreditAttribution: fatcrobat commentedif this site is public, you could leave a link, and i will have an eye on it
probably one of the js functions making trouble with jquery 1.5
Comment #19
beckyjohnson CreditAttribution: beckyjohnson commentedhttp://industryeducation.right-brain.net/ Here you go. This site is still in development.
Comment #20
fatcrobat CreditAttribution: fatcrobat commentedcurrently running jquery 1.2.6 from core... ;/
Comment #21
beckyjohnson CreditAttribution: beckyjohnson commentedwelll i'm running 1.2.6 because i had to disable the module....It wasn't an option for me to leave it on while it was breaking stuff.
Comment #22
fatcrobat CreditAttribution: fatcrobat commentedin this case i can only propose to use firebug / chrome developer tool to find out which of your plugins is breaking your page. Chrome specially has a nice behavior for javascript debugging.
Comment #23
beckyjohnson CreditAttribution: beckyjohnson commentedOk I used FIrebug and I could find no errors. Then I enabled Jquery Update with the port to 1.5 and found this. See attached screenshot. It gives this result on every page, even though my drop down menu at the top still randomly works on some pages.
Meanwhile, under my status pages, it says I have 1.5 running....
I installed the js debugger extension for chrome and it didn't find any errors either...
Comment #24
AlexisWilke CreditAttribution: AlexisWilke commentedbecky,
are you using jQuery UI as well? You may need to upgrade that too. I have on my end to make sure that everything would be compatible.
Thank you.
Alexis Wilke
Comment #25
beckyjohnson CreditAttribution: beckyjohnson commentedI am using jquery ui version 1.8.11......
Comment #26
AlexisWilke CreditAttribution: AlexisWilke commentedBecky,
Ah! That's what I have too. 1.8.11
Thank you.
Alexis
Comment #27
fatcrobat CreditAttribution: fatcrobat commentedjquery is not your problem from my thoughts, but i bet one of your plugins is not running correctly with jquery 1.5.
There have been a plenty of changes and upgrading from 1.2.6 to 1.5 is a huge leap.
Enable jquery 1.5 (hopefully patched the core as i described).
Disable every javascript afflicted module (jquery_ui, dhtml and so on) and enable first things first.
It suxx, i know, but you don't have any other possibility.
Erm one last thought. The First Package from my initial post had wrongly some debugging (console.log) stuff in it. This would break in the most browsers, if console is not active at the time of running the request.
http://drupal.org/files/issues/jquery_update_jQuery_1.5_0.zip is the working one.
Comment #28
beckyjohnson CreditAttribution: beckyjohnson commentedThanks for the advice. I am going to try all of this and see what the result is. I will report back when I'm done.
Comment #29
AlexisWilke CreditAttribution: AlexisWilke commentedI have DHTML menus, simplemenu, addthis, and lightbox2 (among other modules using JavaScript) and none have problems with this upgrade.
I used the .zip in #1 also. Are you saying that the console usage was in #0 or #1 .zip?
Thank you.
Alexis
Comment #30
fatcrobat CreditAttribution: fatcrobat commented#0
Comment #31
jacobroufa CreditAttribution: jacobroufa commentedUsing the file linked in #27 and have Better Exposed Filters installed. Enabling Ajax = Yes in my view breaks the exposed filter... I just get a spinner now with no actual loading. Anyone able to duplicate?
Comment #32
fatcrobat CreditAttribution: fatcrobat commentedDid you execute the patch that is part of the package?
Otherwise Json will not get validated correctly.
Comment #33
jacobroufa CreditAttribution: jacobroufa commentedfatcrobat - thanks! I must have glanced over it. Everything's working perfectly now!
Comment #34
shadysamir CreditAttribution: shadysamir commentedsubscribe
Comment #35
marcp CreditAttribution: marcp commented#1085590: Update to jQuery UI 1.9 has more info on the IE9 issue. If there's going to be another D6 jQuery Update release, I suspect it would only happen with jQuery 1.5.2.
Comment #36
AdrianB CreditAttribution: AdrianB commentedSubscribing.
Comment #37
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedSubscribing ... works like a charm
Comment #38
attheshow CreditAttribution: attheshow commentedSubscribing
Comment #39
fatcrobat CreditAttribution: fatcrobat commentedI will try my best to Port the Module for jquery 1.5.2 as well.
Comment #40
Anonymous (not verified) CreditAttribution: Anonymous commentedAny new progress before I take a stab at it?
Comment #41
fatcrobat CreditAttribution: fatcrobat commentedProgress completed ;)
Run patches/drupal_to_js_proper_json-D6.patch from d6 root dir, it is taken from http://drupal.org/node/1086098. JSON Validation is required by jquery 1.4+.
If you are using my jquery_update_jQuery_1.5.zip version, first reject the changes from jQuery-1.4_plus_JSON_Validation_Fix.patch (included in jquery_update_jQuery_1.5.zip).
Test and leave comments.
Comment #42
bonobo CreditAttribution: bonobo commented@fatcrobat - would it be more helpful to test the module at http://drupal.org/sandbox/fatcrobat/1126104 or the patch in this issue?
How is the sandbox code different than this patch?
Comment #43
kendouglass CreditAttribution: kendouglass commentedSubscribing
Comment #44
fatcrobat CreditAttribution: fatcrobat commented@bonobo - it is just an update of my previous jquery_update version in this post.
The sandbox project provides jquery 1.5.2 support as well but is not done yet and different from this module. ( i have a lot of ideas that will take place in it)
Comment #45
fatcrobat CreditAttribution: fatcrobat commentedstatus changed
Comment #46
Agileware CreditAttribution: Agileware commentedI am using the version in #41 (only since very recently) and everything is working so far (fingers crossed).
Comment #47
mrfelton CreditAttribution: mrfelton commentedAlso using #41 - seems to be working ok.
Comment #48
graytoby CreditAttribution: graytoby commentedI can't apply the patch. I'm using Pressflow, perhaps that's the issue. Below is the error when patching.
However, status report page shows jquery version 1.5.2 and everything seem to work just fine.
Comment #49
fatcrobat CreditAttribution: fatcrobat commenteddunno, what the actual pressflow drupal core version is
this patch is made for drupal 6.20
you can also patch it yourself, there is no magic in it (look at the comment in the patch file for the drupal ticket url)
Comment #50
graytoby CreditAttribution: graytoby commentedCurrent Pressflow is 6.20. I guess the patch is already included. See link below
https://bugs.launchpad.net/pressflow/+bug/547003
Comment #51
fatcrobat CreditAttribution: fatcrobat commentedif your ajax forms (cck imagefield and so on) are working as espected than you are fine ;)
Comment #52
graytoby CreditAttribution: graytoby commentedWell, I actually run into lots of issues. All js is actually broken, in firebug I get "Uncaught Syntax error, unrecognized expression: [href^=http://]" . "^" not escaped properly?
Comment #53
fatcrobat CreditAttribution: fatcrobat commentedon ajax forms only, or generally?
Comment #54
AlexisWilke CreditAttribution: AlexisWilke commentedspongecat,
Without that change, you'll get surprises here and there. I think update.php is one of them, I don't remember what was breaking for me, but some things would not make it right without that change. However, you are right, the main site generally works as is.
Thank you.
Alexis
Comment #55
Trinorae CreditAttribution: Trinorae commentedI tried the patch in #41 . I had some problem with a script I wrote in jQuery 1.5 which I wanted to work in Drupal. I had tried replacing some files, by which I got it working on my local dev-version and also on the production website. Although when I was logged in on the production website, it still used an old jQuery. Another "bug" was that the views-module wasn't working correctly anymore. When I go to administer > site building > views, the Javascript on that page fails.
After using this patch on my local dev, the views still isn't working. I wil notice whether or not it changes the other problem after I applied it to the production.
Anyway: nice that someone tries to get jQuery 1.5 to D6, because 1.2 really isn't enough!
Comment #56
AlexisWilke CreditAttribution: AlexisWilke commentedTrinorae,
Did the application of the patch jQuery-1.4_plus_JSON_Validation_Fix.patch report any errors? On my end I had to apply it by hand since I have modification in my version. Maybe you had a similar problem?
Thank you.
Alexis
Comment #57
mrfelton CreditAttribution: mrfelton commentedI take my comment back from comment #47 - there are some problems...
#1152552: JAvascript error when attempting to remove image from filefield field - has been caused by the upgrade.
It sounds very similar to #737686: Image field 'Remove' button broken and related to #1064890: Update jQuery Form to 2.64
Comment #58
mrfelton CreditAttribution: mrfelton commentedChanging status.
Comment #59
fatcrobat CreditAttribution: fatcrobat commented@mrfelton
imce and filefield are not related to another.
is your issue related to imce or filefield? aren't you able to upload files inside a content type file field or from imce?
@Trinorae
views are working for me, as expected...
try to revert common.inc to drupal 6.20 original and than reapply the patch (from drupal root), watch for error messages
views are heavily using ajaxform (this is exactly what the patch is intended for)
Comment #60
graytoby CreditAttribution: graytoby commentedGenerally. I have some custom scripts, jquery cycle, slideshow, forms, calendar popups, all scripts just stop working.Fixed now. The issue was caused by External New Tab module.
Comment #61
mrfelton CreditAttribution: mrfelton commented@fatcrobat - yes, I know they are not related. However, attempting to click on the 'Remove files' button on a filefield results in the error that I detailed in the IMCE issue. The js error is coming from a line in the code of the IMCE module, however, if you trace it back, the reason for this is to do with an error in the ajax processing done by filefield. I have no idea why IMCE is attempting to do anything when filefield throws an error.
So, to clarify. The problem actual problem relating to the jquery_iupdate is with filefield - more specifically, attempting to remove files from existing fields. See the issues that I referenced for more info on how that relates to jquery 1.5
Comment #62
jthomasbailey CreditAttribution: jthomasbailey commentedSeems to break Panels drag and drop.
Comment #63
fatcrobat CreditAttribution: fatcrobat commentedOnly use jquery 1.5.2 if you know, what you are doing. Use firebug or chrome dev tools to debug js.
Some selectors are no longer supportet, methods changed, ajax behavior changed completely. Only Update to jquery 1.5.2 if you know, that it might be risky in combination with modules that are using jquery.
Using plugins that are based on jquery 1.2.6 and wondering, that something breaks is no surprise ;)
Comment #64
mrfelton CreditAttribution: mrfelton commentedIt also seems to break the Views UI pretty badly. Clicking on any of the gear icons just results in a popup with a load of debug output.
Comment #65
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedI can't confirm that. Views 2 + jQuery 1.5 here and i can click on the gear icons without any problems and get the desired settings below.
Comment #66
Agileware CreditAttribution: Agileware commentedThe error in views should go away if you apply the patch in the patches directory.
There will also be many other errors if you have not applied that patch.
Comment #67
Trinorae CreditAttribution: Trinorae commentedI manually applied the jQuery-1.4_plus_JSON_Validation_Fix.patch patch, since I couldn't get it working. My views are working now! Thanks for the information!
But I still have a weird problem I just noticed yesterday. I have a script using jQuery 1.5.1 . When I'm logged in as admin, the script is working just fine and using jQuery 1.5.2 . But when I'm not logged in, I'm stuck with 1.2.6 !
It seems like when I'm logged in Drupal is using the jQuery located in the /sites/[site]/modules/jquery_update/replace/-folder but when I'm not logged in it uses the jQuery located at /misc/ ..
Am I still doing something wrong?
Comment #68
AlexisWilke CreditAttribution: AlexisWilke commentedJust to make some more noise, wanted to say that I did not notice any problem with IMCE which I use.
Comment #69
mrfelton CreditAttribution: mrfelton commented@Agileware - yes, thank you. The problems in Views went away after appliying patch, as well as my original issue with imagefield/imce.
Comment #70
franzkewd CreditAttribution: franzkewd commentedSame to #62. Panels' drag and drop fail. Other than that seems working fine so far.
Comment #71
Agileware CreditAttribution: Agileware commentedJust as a note, it has a compatibility issue with the wysiwyg_imageupload module.
For details see #1153502: Support newer jQuery and jQuery UI versions
Comment #72
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedIt seems the Panels Drag&Drop problems are actually caused by CTools js breaking.
For details see #874388: Support jQuery 1.5.2
Comment #73
btully CreditAttribution: btully commentedsubscribe
Comment #74
sahaj CreditAttribution: sahaj commentedsubscribe
Comment #75
sahaj CreditAttribution: sahaj commentedDo Drupal 6.22 need a new patch version?
Comment #76
AlexisWilke CreditAttribution: AlexisWilke commentedBy the way, I am experiencing some problems with books. When I want to create a new book the JavaScript fails. Could this be because of this patch?
Thank you.
Alexis
Comment #77
fatcrobat CreditAttribution: fatcrobat commentedpatch for drupal 6.22 still required
jquery 1.6.1 working for me as well (no single module support...)
Comment #78
fatcrobat CreditAttribution: fatcrobat commentedComment #79
fatcrobat CreditAttribution: fatcrobat commentedComment #80
balsagoth CreditAttribution: balsagoth commentedThe jquery_update with jquery 1.6.1 on #77 with drupal 6.22 don't allow create an imagefield.
Comment #81
fatcrobat CreditAttribution: fatcrobat commentedjep, i will dive into it, but looks like an filefield js prob so far
Comment #82
eric.chenchao CreditAttribution: eric.chenchao commentedsubscribe
Comment #83
pvasili CreditAttribution: pvasili commented+ IMCE, +Views :(
Try us a little hack: add the custom(php) block
and set the work area:
Perhaps other path :)
Comment #84
phyadmin CreditAttribution: phyadmin commentedThe provided zip on #77 doesn't seem to include everything properly. When I try to install jQuery_update from its contents after unzipping it, the option does not appear in the module installation menu. I did install the dev version of jQuery update first, then uninstalled it.
Comment #85
phyadmin CreditAttribution: phyadmin commentedFixed by taking dev branch of jquery_update and replacing contents of replace/ directory with contents of replace/ directory provided in #77.
<RantCausedBy2HoursOfUnsuccessfullyDebuggingNebulousDrupalError\>
Honestly guys, this is shoddy work. If you're working on a dependency update that's likely to be wanted by the community, you should probably work with the module maintainers on merging your results to the development branch instead of ad hoc adding zip files to issue comment threads like a bunch of independent code cowboys. How many conflicting comment threads are users of modules supposed to be expected to traverse because you can't clean up and sync your efforts? >:/
</RantCausedBy2HoursOfUnsuccessfullyDebuggingNebulousDrupalError>
Comment #86
fatcrobat CreditAttribution: fatcrobat commentedjquery 1.3.2+ can't be merged together with the jquery_update module, because you have apply a core patch to get it working
Comment #87
kenorb CreditAttribution: kenorb commentedI need at least jQuery v1.5.2 in 6.x, because of IE6, where page is not loaded properly in earliest versions.
I.e. this page: http://demos.openspending.org/openspendingjs/app/spend-browser/
doesn't work under IE6 with jQuery v1.3.2, but works with v1.5.2
jQuery bug: http://bugs.jquery.com/ticket/6498
Forum discussion: http://forum.jquery.com/topic/object-doesn-t-support-this-property-or-me...
Related: #1184704: Load different jQuery version on specified page.
Comment #88
emattias CreditAttribution: emattias commentedI use 1.5.2 on my D6 site, since admin module doesn't work with jQuery 1.6.
But I use jQuery 1.3.2 in my admin theme to make sure that all the forms, panels/ctools config, views config etc work.
I do the same thing that jquery_update does in preprocess_page (except for replacing the non jquery code js file like, tabledrag.js etc. since jquery update has already replaced them).
Here is my theme_preprocess_page function:
Comment #89
kenorb CreditAttribution: kenorb commentedWorkaround loading different jQuery version on specified page:
http://drupal.org/node/1184704#comment-4594198
Comment #90
ipwa CreditAttribution: ipwa commentedDuplicate issue?
see: http://drupal.org/node/1085590
We should have patches in one main thread so the maintainers can review it, commit and make a new much needed release.
Comment #91
Agileware CreditAttribution: Agileware commentedThat is not a duplicate issue.
That issue is for drupal core, this one for jquery_update.
Comment #92
ipwa CreditAttribution: ipwa commentedSorry guys, keep up the good work, hopefully this can be resolved soon and I can have the Drupal 6 branch of Jquery Reel Formatter depending on the new release.
Comment #93
klonosDupe?: #1156860: Offer latest jQuery 1.6.x as an option (currently 1.6.4).
Comment #94
alexweber CreditAttribution: alexweber commentedNope, this thread is specifically about Drupal 6.x and the other about 7.x
Comment #95
klonosThanx for taking the time to explain Alex. Don't mind if we make this a bit clearer in the issues' titles then.
Comment #96
ohnobinki CreditAttribution: ohnobinki commented+
drupal6 really needs a way to get, at a minimum, jQuery-1.5.2. Otherwise IE9 throws Javascript exceptions when it's loading, leaving its users with the AJAX-free fallbacks.
Comment #97
achtonSubscribe
Comment #98
ohnobinki CreditAttribution: ohnobinki commentedOh, I just noticed that IE9 stops throwing those Javascript exceptions if I turn off my custom
Content-Type: application/xhtml+xml
. So I guess this isn't as critical as I thought in #96.Comment #99
scorchio CreditAttribution: scorchio commentedCould someone please summarize the progress on this one? I'm really interested, because this could solve a bunch of issues with CiviCRM integration for example.
Comment #100
scorchio CreditAttribution: scorchio commented[was a duplicate post by mistake, please ignore]
Comment #101
Agileware CreditAttribution: Agileware commentedFor those looking at this in regards to getting rid of civicrm javascript conflict errors you should also check out this post #691746: Javascript Error when using CiviCRM as there has been a little discussion there.
Actually it would be good if a documentation page was created with the info from that issue, instead of an issue for an unrelated module. Then there could be an easier to find discussion on the topic.
Comment #102
scorchio CreditAttribution: scorchio commentedAgileware, you're right; I will try to do my best to document our findings about getting CiviCRM work. Thanks for the link.
Comment #103
jvieille CreditAttribution: jvieille commentedsub
Comment #104
Leksat CreditAttribution: Leksat commentedsubscribe
Comment #105
Leksat CreditAttribution: Leksat commentedIf someone urgently needs recent Jquery version for custom module, you can use solution I used to make Jquery Chosen plugin (which required Jquery 1.4+) work with Drupal 6.
http://drupal.org/node/1223556#comment-4902538
This is not related to this issue, but may help in urgent necessity.
Comment #106
izmeez CreditAttribution: izmeez commentedsubscribing
Comment #107
keesee CreditAttribution: keesee commentedsub
Comment #108
j0rd CreditAttribution: j0rd commentedsubscribing
Comment #109
chadmkidner CreditAttribution: chadmkidner commentedsubscribe
Comment #110
paulgemini CreditAttribution: paulgemini commentedQuestion:
how would folks describe the current state of this patch? I have a live site where I want Views Slideshow Slider but need Jquery 1.6...but I'm a bit wary of testing this on the site without more info about the status.
Comment #111
AlexisWilke CreditAttribution: AlexisWilke commentedThe 1.5 works for me on all my production sites. I did not try 1.6 (yet) as I don't need it...
I had the impression that the 1.6 patch was not 100% perfect, but I may be wrong.
Good luck,
Alexis
Comment #112
LateNightDesigner CreditAttribution: LateNightDesigner commentedJust want to say I got this solved way back when. Apparently I had to instances of Jquery being called by two different modules. Thanks fatcrobat.
Comment #113
chadmkidner CreditAttribution: chadmkidner commentedNoticed that 1.5.0 has bugs in IE9 (but what else is new with IE), upgraded the jquery.js with the 1.5.2 ver and all was well. So currently I am running the 1.5.2 jQuery release on D6 and have not seen any noticeable problems yet in any of the newest stable releases of Chrome, Firefox, Opera, or in IE9. I use a lot of js too so I'd say its safe ;) If your want to test it on another browser, the website where I am running it is www.veilep.com (all sections of site).
As a side note to include some of the various modules that I have enabled on this site include: Colorbox, Views, Views Slider, Date Popup, DS, Fivestar with Voting API, Drupal for Facebook, Sections, and Ubercart with extras. I also have added some custom jQuery eye-candy here and there that aren't the use of any modules.
--take away.. D6 site using extensive use of jQuery v1.5.2 seems to be working pretty dandy. :)
UPDATE: So just upgraded to views 3.0-alpha4 and views slider 3.0 which seemingly broke all my jQuery Sliders.. All are changed to these new 'Cycles' but get the following error (Uncaught TypeError: Object [object Object] has no method 'cycle'). In process of working out, till than site is a little on the mild side with all the cool jQuery jiveness..
Comment #114
MrMaksimize CreditAttribution: MrMaksimize commentedSo this is a patch i rolled for jquery_update with the help of fatcrobat's code from here - http://drupalcode.org/sandbox/fatcrobat/1126104.git/
I know that d6 is going away soon, and its tough to maintain legacy compatibility for modules, but there are a lot of sites out there still using d6 and it's unfeasible for them to switch over to d7 just yet, but using jquery code from 3 years ago is getting really tough.
Please examine and test this patch and consider rolling it into the module.
Thanks!!
Also, in order for this patch to work in drupal6 core, you need to patch it with this: http://drupal.org/files/issues/drupal_to_js_proper_json-D6_0.patch
However, if you are using pressflow, no patches are needed.
And the corresponding issue - http://drupal.org/node/1086098
Thanks!
Comment #115
MrMaksimize CreditAttribution: MrMaksimize commentedSo i had a few problems with git, and that patch is incorect. Please use the one attached here
Comment #116
kevinob11 CreditAttribution: kevinob11 commented#115 is working perfectly for me. Thanks @mrmaksimize!
Comment #117
aidanlis CreditAttribution: aidanlis commentedHere's a patch without whitespace errors and tabs.
To apply:
Then, if you're using the admin module you'll want to apply this patch (http://drupal.org/node/1354328):
And that's it.
Comment #118
Leksat CreditAttribution: Leksat commentedI've applied the patch from #117 to my Pressflow installation. It works good. But in the Pressflow drupal_to_js() function updated to drupal_json_encode() from D7. So I didn't apply drupal_to_js_proper_json-D6_0.patch.
I found that all ajax requests fail. I tried to change the code of drupal_to_js() function from
to just
After that ajax requests work fine.
Can anyone confirm the problem?
Comment #119
Leksat CreditAttribution: Leksat commentedAlso, I wasn't able to upload files until I update Jquery Form plugin to latest version (2.93 http://jquery.malsup.com/form/#download).
Comment #120
MrMaksimize CreditAttribution: MrMaksimize commented@leksat sorry might be a little sleepy. You were trying to get this to work in d7 pressflow?
Comment #121
Leksat CreditAttribution: Leksat commentedNo. I tried it on Pressflow 6.22.
I just meant that drupal_to_js() is different between Drupal 6 and Pressflow 6.
D6: http://api.drupal.org/api/function/drupal_to_js/6
P6: https://github.com/pressflow/6/blob/master/includes/common.inc#L2489
Comment #122
Leksat CreditAttribution: Leksat commentedProblem described in #118 is not actual. I can't reproduce it since Jquery Form plugin update.
Comment #123
semantric CreditAttribution: semantric commentedCouldn't get patches to work, so I replaced my jquery_update with the version in #77.
I encountered a problem; a setting that I added via drupal_add_js() in a template.php preprocess function was not being set.
I looked at the code and noticed this difference (+ is the original module code, - is the code from the version in the zip file in #77)
This is the change that somehow prevents my attempt to add a js setting with drupal_add_js() in mytheme_preprocess_page() from working. When I changed the module file back the the original version, everything seemed to work fine (including jquery 1.6). What was this change intended to do / why was it included?
Comment #124
Leksat CreditAttribution: Leksat commentedFor those who can't apply the patch, I've attached the complete patched module. It includes:
1. Patch from #117, Jquery updated to 1.7.
2. Jquery Form plugin updated to 2.93.
The patched module works perfect for me. I faced minimum problems with contrib modules (I use a lot of them).
But. My drupal_to_js() function looks like:
And this code requires PHP >= 5.2.0 (I use Pressflow - https://github.com/pressflow/6/blob/master/includes/common.inc#L2489)
In my company we tested the patched module under IE7-9, FF and Chrome.
Comment #125
jvieille CreditAttribution: jvieille commentedjQuery 1.7 does not work with Panels
http://drupal.org/node/866178
Comment #126
aidanlis CreditAttribution: aidanlis commentedTo make this really easy:
Here is a sandbox containing the 6.x-3.x branch which updates you to jQuery 1.7:
http://drupal.org/sandbox/aidan/1367896
Here is a request to add me as a maintainer so I can commit this branch:
http://drupal.org/node/1367914
Here is a zip of jquery_update-6.x-3.x-dev if you cannot use git or apply patches:
https://github.com/aidanlister/jquery_update/zipball/6.x-3.x
Please use the issue queue on the sandbox for issues, rather than this thread (which has gotten long and difficult to follow):
http://drupal.org/project/issues/1367896
Comment #127
klonosThanx Aidan...
#1368372: Initial release of jquery_update-6.x-3.x? / Current status / What needs testing ...a.k.a. "Are we there yet?"
Comment #128
EvanDonovan CreditAttribution: EvanDonovan commentedIs there a corresponding issue for Drupal 7? In the Drupal 7 version of this module I really only had to change lines 123 & 128 to get the CDNs to serve up the right version (though I didn't actually add it into the module).
There would be additional files needed to replace from core, though, such as field_ui.js - see #1327440: Error: "Add existing field: you need to select a widget" when adding a field if jQuery is updated.
Comment #129
lanzs CreditAttribution: lanzs commentedSubscribe
Comment #130
lanzs CreditAttribution: lanzs commentedDoesn`t work CCK field widget select..
Comment #131
alexweber CreditAttribution: alexweber commentedI have succesfully been using #124 in a couple production websites with no problems whatsoever.
That said, I don't use Panels.
Comment #132
jvieille CreditAttribution: jvieille commentedYes, same for me: everything woks but Panels...
Comment #133
kevinob11 CreditAttribution: kevinob11 commentedI'm having the same problem with the select widget field for adding cck fields. Also doesn't work when hiding or revealing text areas in the views interface.
Comment #134
chadmkidner CreditAttribution: chadmkidner commentedFollow up to #113 - Not sure if I should have needed to but I download the cycles js and included in my .info file and all is well again.
Comment #135
CZ CreditAttribution: CZ commentedThe file jquery_update_1.7.zip [1] works well with the jQuery-color plugin [1] (no errors in the firebug console). The plugin requires jQuery 1.4.3.
[1] http://drupal.org/node/1067290#comment-5340730
[2] https://github.com/jquery/jquery-color/blob/master/jquery.color.js
Comment #136
jvieille CreditAttribution: jvieille commentedMaybe a naive question, but why do we have to stick with only one Jquery version?
Why is this module have to be adapted for every specific jquery version?
I would think that one would just be able to use the version that fits by (ideally) selecting one of the versions made available by uploading the jquery files in the module "replace" folder or better in the "libraries" Drupal folder? - or at least by uploading / renaming the chosen files.
(for example, 1.6 would make Panels happy)
Comment #137
klonosHey everybody! My first post in days... I am officially a full-time dad since past Thursday!!!
@jvieille: Jean, read here why: #715024: Support for Libraries API
Comment #138
aidanlis CreditAttribution: aidanlis commented@jvieille Drupal was written for jQuery 1.2, and every new version of jQuery introduces changes which are not back compatible. So every time we upgrade jQuery we need to rewrite portions of Drupal's javascript.
Comment #140
RobLoachI've committed the initial support for this, while keeping it in line with #1386294: Release jQuery 1.7 for Drupal 7. It supports using either 1.3 (default) or 1.7, but is definitely just the beginning. I combined a bunch of code I found from both the attached patches and sandboxes. Thank you to all who have been involved so far!
http://drupalcode.org/project/jquery_update.git/commit/fe49dd1
Let's get the other stuff in there, like the jQuery Form update, jQuery UI, etc!
Comment #141
squarecandy CreditAttribution: squarecandy commentedsubscribe
Comment #142
j0rd CreditAttribution: j0rd commented@RobLoach with regards to #140.
I've installed jquery_update 6.x-2.x-dev and tested it on my site with jQuery 1.3 & 1.7. Looking forward to testing 1.7, so I really enjoy this split 1.3 & 1.7 versions in the same module to toggle on and off. Great job.
jQuery 1.3 appears to work as expected. jQuery 1.7 seems to mess up colorbox (lib ver. 1.3.18) module pretty good. I've also updated colorbox to the latest version (1.3.19) which is supposed to work with jQuery 1.7, and it still messed up. Lots of JS errors in Dom Inspector.
Just posting my experience.
Comment #143
jvieille CreditAttribution: jvieille commentedI appreciate this too, but
- 1.3.2 does not work anymore for me http://drupal.org/node/1413880
- 1.7 breaks Panels (not the fault of this module though) http://drupal.org/node/866178
Comment #144
btully CreditAttribution: btully commentedUnfortunately, jquery 1.7 (or anything newer than 1.3.2) breaks A LOT of stuff on the node editing side of things, even with the latest jquery.form.js (2.9.5) Things like multi-fields that can be reordered by dragging in 1.3.2 do not work in 1.7. The drag handle never appears. My guess is tabledrag.js needs some updating but I'm not sure what/where.
Other things that break are some fields that use ahah.js to perform ajax requests, dynamically retrieving content when certain fields are updated. The newest jquery.form.js seems to fix file/image uploads.
But the main issue seems to be tabledrag.js. Any smart people expert in Javascript have a clue on how to fix this?
Comment #145
AlexisWilke CreditAttribution: AlexisWilke commentedPersonally I stick with 1.5 at this point and it works just fine. ahah has always had problems anyway, but I don't generally use that feature. From what I can seen, there is a ahah.js and tabledrag.js in the replace folder of jquery_update so it should use those files.
Comment #146
btully CreditAttribution: btully commentedInteresting, even with 1.5 I still get the tabledrag issues, which is a very important feature. In other words you can no longer drag/drop reorder blocks in the block admin page, nor can you drag/drop reorder fields within a node edit form (e.g. a node reference field with multiple fields).
Anyone know who I'd talk to about helping out with this -- perhaps someone who worked on the current version of tabledrag.js?
Comment #147
btully CreditAttribution: btully commentedDOH! Sorry looks like the version of tabledrag.js included in the downloads from #1 fatcrobat, #117 aidanlis and #124 Leksat do indeed fix the tabledrag issues! Apparently I was testing with the version from within the latest 6.x-2.x-dev package. Thanks to all involved! Now to figure out those ahah.js issues...
Comment #148
btully CreditAttribution: btully commentedI've resolved some of the AJAX/JSON weirdness with the attached patch to drupal.js. From what I've read, it seems newer versions of jQuery handle the JSON response differently and return an actual object rather than the string that Drupal.parseJson expects. This results in an error that the object has no substring property/method.
I've also read that the Drupal.parseJson function is deprecated in D7 and that jQuery.parseJSON is used instead. Since Drupal.parseJson is used in ahah.js as well as several contrib modules, I decided it would be less painful to update the Drupal.parseJson function and make it more friendly with newer versions of jQuery rather than patching all contrib modules to change all references to jQuery.parseJSON.
Please review the patch and let me know how it can be improved.
Comment #149
vorapoap CreditAttribution: vorapoap commentedI have tried #148(btully) and #124(Leksat)
#148 doesn't work for me, but #124 from Leksat simply does a job for me!
http://drupal.org/node/1067290#comment-5340730
Comment #150
Rosamunda CreditAttribution: Rosamunda commentedI have "some" stuff that´s not working, and I just assume that maybe I needed the jquery update to 1.7+. I´ve used the patched version in #124 and the problem is still there...
Any news on this?
Thanks!
Rosamunda
Comment #151
krisrobinson CreditAttribution: krisrobinson commented#124 breaks my Admin module and Views 3 module.
Comment #152
rjbrown99 CreditAttribution: rjbrown99 commentedI'm using 6.x-2.x-dev as of the latest commit, with version 1.3 of jquery. What I am seeing are attempts to serve the following path -
http://mysite.com/JQUERY_UPDATE_REPLACE_PATH/ahah.js
... and that seems to have been removed with the commit from Rob Loach here which corresponds to the comment 140 earlier in this thread. So at the very least, that patch is having some issues as something is still looking for the constant that was removed.
EDIT - my bad, this is related to my use of the ajax_load module. They hardcoded the use of JQUERY_UPDATE_REPLACE_PATH into that module. Perhaps this is something to point out in documentation when this finally makes its way out into a release version, and in the meantime here is my new ticket in the ajax_load issue queue: #1675032: Remove use of JQUERY_UPDATE_REPLACE_PATH constant.
Comment #153
rjbrown99 CreditAttribution: rjbrown99 commentedOK, so ctools is also using that hardcoded JQUERY_UPDATE_REPLACE_PATH constant. See the function ctools_js_replacements() in ctools.module. Given that other modules seem to have built dependencies on it, would it be best to rethink the approach here and keep that constant intact in jquery_update?
In the meantime, I opened an issue in the ctools queue: #1675062: Remove use of JQUERY_UPDATE_REPLACE_PATH constant.
In both of the above cases (ajax_load and ctools), simply re-adding the constant to the top of jquery_update.module fixes things.
Comment #154
psegarel CreditAttribution: psegarel commentedI don't understand the logic of implementing JQuery with Drupal knowing that a jQuery update will eventually break functionality.
If JQuery's updates are not backward compatible, it looks like it would have made sense to namespace the version that ships with Drupal 6 so that it can run alongside a newer version? The responsibility would then fall on the modules to either adapt to the Drupal version or update to the latest JQuery release. Wouldn't it?
Comment #155
man-1982 CreditAttribution: man-1982 commentedDont work select widgets type, when create a new type of field in node type (admin/structure/types/manage/node_type/fields). It`s little bug in field_ui.js and this is pathc resolved it :)
Comment #156
brandenlhamilton CreditAttribution: brandenlhamilton commentedThe attached patch simply updates against the 6.x-2.x (DEV) head to bump the version of jQuery included to 1.7.2
Comment #157
brandenlhamilton CreditAttribution: brandenlhamilton commentedThe attached patch implements #156 exactly, only now generated from the project root directory so that it can be applied without prior knowledge of where I generated the diff. (oops)
Comment #158
brandenlhamilton CreditAttribution: brandenlhamilton commentedThe attached patch implements #153, however, updated to reflect new folder structure of the latest 6.x-2.x branch. Also explicitly labels the constant as deprecated. It appears the maintainers intention is that jquery_update_jquery_path() should be used going forward.
Comment #159
gateway69 CreditAttribution: gateway69 commentedI just ran into this issue as well, when will the patch be submitted into the module?
Comment #160
bdlangton CreditAttribution: bdlangton commentedThis is a fix to the #158 patch. The constant needs to be defined to the path of jquery_update/replace, not jquery_update/replace/jquery/1.x.
Comment #161
ispboy CreditAttribution: ispboy commentedThanks. It works fine with pressflow.
Comment #162
ispboy CreditAttribution: ispboy commentedi found that when editing views, the [Group multiple values] dropdown not work.
now, i've changed to use jQuery Multi module.
Comment #163
chadmkidner CreditAttribution: chadmkidner commentedChanging the title back as this page is for Drupal 6, if anyone's looking for the Drupal 7 support for jQuery look to http://drupal.org/node/1386294
Comment #164
OnkelTem CreditAttribution: OnkelTem commentedCCK Widgets doesn't work. What it is supposed to do with that?
Comment #165
chilic CreditAttribution: chilic commented+1
Not work admin page CCK Widgets and upload/delete image or file with ajax.
Comment #166
digi24 CreditAttribution: digi24 commentedI tried the current 6.2-dev and various jquery_ui and form versions. (I took special care of Drupal parseJSON/jQuery parseJSON) Dragging works and the Views UI are working.
But I have trouble with the filefield upload widget (HTTP Error 0) and the ctools modal (stuck loading). Is one of the two things working for anybody and if so, could you comment on your setup?
Comment #167
DamienMcKennaFYI I submitted a patch to resolve this in CTools: #1675062: Remove use of JQUERY_UPDATE_REPLACE_PATH constant
Comment #168
milovan CreditAttribution: milovan commentedIs drupal_to_js_proper_json-D6.patch necessary? Because currently it breaks some stuff like module webfm. More info about problem posted on te issue where patch is coming from.
Comment #169
markhalliwellDrupal 6 reached EOL (end-of-life) on February 24, 2016.