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.
This patch will add in the ability to update the jQuery version within the theme itself. Helpful, as this is usually one of the first things that happens.
Few things to note:
- Although it pulls from a CDN, it adds in scripts to fall back on a local copy of the code if necessary. (CDN down, or working locally)
- Because of that, it also includes several versions of jQuery
- Also includes the option (while using a CDN) to use the un-minified version of the code
Comment | File | Size | Author |
---|---|---|---|
#7 | add_in_jquery_update_support-7.patch | 273.58 KB | iamcarrico |
#5 | add_in_jquery_update_support-5.patch | 273.59 KB | iamcarrico |
add_in_jquery_update_support-1.patch | 5.01 KB | iamcarrico |
Comments
Comment #1
iamcarrico CreditAttribution: iamcarrico commentedIt will also have a patch that comes with it for the compass-aurora side, so that the settings are added in the .info file.
Comment #2
Snugug CreditAttribution: Snugug commentedThanks for this. I'll take a look at this, might need a little bit of tweaking to make these options all AJAX-y and awesome like the rest of the theme settings page, but otherwise generally looks good. Going to test.
As for the compass-aurora side, a pull request is better than a patch here.
Comment #3
iamcarrico CreditAttribution: iamcarrico commentedBut of course.
Comment #4
Snugug CreditAttribution: Snugug commentedAwesomesauce. TYM
Comment #5
iamcarrico CreditAttribution: iamcarrico commentedI forgot to make the diff include the new jQuery files. New patch.
Comment #7
iamcarrico CreditAttribution: iamcarrico commentedFixed the error
Comment #8
iamcarrico CreditAttribution: iamcarrico commentedLet me know if it does actually apply for you. It does in my environment
Comment #10
Snugug CreditAttribution: Snugug commented#7: add_in_jquery_update_support-7.patch queued for re-testing.
Comment #12
Snugug CreditAttribution: Snugug commentedWhile I can get this to apply (it has a whitespace issue when it applies, but it will apply cleanly), because of Force Header, the scope for the backup for the CDN is wrong, and when adding Force Header => True with it, it comes in before the external call, which is an issue. Because of how tightly coupled Drupal and jQuery are, jQuery, jQuery.once, Drupal.js, and Settings all need to be loaded in the head still. Anyway, this is a problem because this then breaks all the things, so there's still some work that needs to be done, possibly in scripts.inc to fix the group weight issues.
Comment #13
iamcarrico CreditAttribution: iamcarrico commentedI see what you mean, I have gone over how the code in scripts.inc goes, and I think I see how it could work better. I will need to do a bit more testing before I can comment on how to get jQuery to be organized better. I know in the past, the only (main) issue we had was when a WYSIWYG was enabled, having code be in the footer caused more issues.
I will look into it this weekend.
Comment #14
iamcarrico CreditAttribution: iamcarrico commentedCommitted.