After installing jquery update and setting the active version as 1.7, jquery was updated. However, when I flushed the cache tables, Drupal reverted to the core 1.2.3 version, and remained locked on that until I clicked "Reset to default values." Even setting the version again had no effect.
Changing line 119 to:
$pattern = '#jQuery.+v([0-9\.a-z]+)#';
Fixed the problem for me; there's probably a safer/more intelligent regex, so I'm not submitting a patch - but it needs to take into account that jQuery 1.7 doesn't have "Javascript Library" in front of the version number.
Comments
Comment #1
rbayliss commentedYeah, I see this too. Looks like there's two things at work here:
1. The submit handler to flush the caches runs after system_settings_form_submit(), so it detects the version of the old jquery update setting. This explains why 1.7 initially works.
2. The regex isn't picking up any version numbers besides 1.3.
The attached patch fixes problem 1, and allows version numbers to be detected for both development and minified versions of 1.2.6, 1.3.2, and 1.7.1.
Comment #2
gkallenbergThis is still an issue nearly one year later. Not sure if this approach is better, but I found that if I copied the top comment from the un-minified version to the minified version of whatever version of jQuery is being included would help to keep the replace variable set as 1.
I'm having to use the development version of 1.7.2 on my site until the comments on the 2 jQuery versions are the same so that the pattern matching that happens on cache clear finds the jQuery file and keeps the replace variable 1. Otherwise, the variable is 0 and no replacement is done. We use this module to employ version 1.3.2 and 1.7.2 (homepage only), and having 1.3.x on the rest of the site is crucial. Mine is an edge-case, but I still found it annoying that the replace variable would be set to 0 in the background, and no replacement was done. No drupal_set_message or watchdog log or anything.
Comment #3
jfrederick commentedI experienced this problem and the patch in #1 fixed it and applied cleanly to 6.x-2.0-alpha1+7-dev. thx rbayliss.
Comment #4
ag_design commentedI experienced also this problem and the patch in #1 fixed it and applied cleanly to 6.x-2.0-alpha1+7-dev. thx rbayliss.
Please include this patch in next dev release for 6.x.
Comment #5
justin.hopkins commentedAgreed. This patch applies cleanly and works. RTBC
Comment #6
markhalliwellDrupal 6 reached EOL (end-of-life) on February 24, 2016.