I didn't want to downgrade jQuery on ALL admin paths just because I had one that I knew needed the downgrade.

So here is my proposed solution:

  1. Add another select beneath the "Alternate jQuery version for administrative pages" select, I call it "Alternate jQuery version for specific paths"
  2. If you select any jQuery version other than "Default", a textarea appears where you can specify path patterns where you want the selected jQuery version to be used

That is what this patch does. It uses the core function drupal_match_paths to match the patterns.

One thing that I like with this solution is that this is very declarative and straightforward regarding which paths this version will be used on.

I made it so that this very specific choice has the last word and overrides any other jQuery version choice made by the jQuery update module.


emattias’s picture

Status: Active » Needs review
3.05 KB

Here's the patch that implements my solution.

emattias’s picture

Issue summary: View changes
emattias’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
miccelito’s picture

Did try your patch but it seems that 'Default jQuery Version' value does override the 'Alternate jQuery version for specific paths' value.

For example with these settings:
Default jQuery Version: 1.8
Alternate jQuery version for administrative pages: Default (provided by Drupal)
Alternate jQuery version for specific paths value: Default (provided by Drupal)
jQuery and jQuery UI CDN: jQuery

But paths 'node/*/edit' and 'node/add/*' still use default jQuery version 1.8.

oushen’s picture


markcarver’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

#1969244: Specify jQuery version per theme has been committed, this feature will need to work/detect after the theme jquery version is detected (if any).