Problem/Motivation

Version 7.x-2.3-alpha1 of this module does not currently check to see whether it is being called from Drupal's administration section. This can cause issues with other modules such as media, where the media browser does not appear correctly with later versions of jQuery.

This is fixed in later versions of the module, which take a different approach to this patch.

Proposed resolution

Include the following code within jquery_update_library_alter()

// Don't update jQuery on admin pages
if (path_is_admin(current_path())) {
  return FALSE;
}

Remaining tasks

Create patch for this version of the module.

User interface changes

None

API changes

None

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

mattfarrow’s picture

Title: Test for administration pages gives false negative » Test for administration pages
Issue summary: View changes

Updating this issue as it appears that the test for administration pages was actually not included with this version of the module at all - it was added by a contractor working on our Drupal installation. Will update the issue accordingly

mattfarrow’s picture

Issue summary: View changes

Corrected typo

mattfarrow’s picture

Title: Test for administration pages » Optionally exclude administration pages

Changed title to be more descriptive.

mattfarrow’s picture

Status: Active » Needs review
FileSize
1.27 KB

Patch attached.

mattfarrow’s picture

Changed status.

hass’s picture

Title: Optionally exclude administration pages » Optionally exclude pages
Version: 7.x-2.3-alpha1 » 7.x-2.x-dev
Category: Bug report » Feature request
Priority: Minor » Normal
Status: Needs review » Needs work

You should add a configuration option. A textarea of paths that are configurable and that allow everyone to extend the list. You can steal the code in Google Analytics module.

hass’s picture

Title: Optionally exclude pages » Optionally exclude pages by path
markcarver’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Parent issue: » #2852350: [jquery_update] 7.x-3.0 stable release

This will likely still be wanted/needed in 7.x-3.x.