The jQuery UI Effects library normally does not depend on jQuery UI core. Therefore, it's possible for code in Drupal to load that library on a page where jQuery UI core is not being explicitly used.

However, the CDNs used by jQuery Update lump them all together in the same file. And the jQuery Update module associates this file with the jQuery UI core entry in hook_library() alone (and removes all the individual JS files defined in hook_library()). Therefore, if someone does drupal_add_library('system', 'effects') without also doing drupal_add_library('system', 'ui'), jQuery Update will prevent the Effects library from being loaded, and the JavaScript will break.

An example from Hierarchical Select module: #1536230: Animations conflicting with jQuery Update module

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new704 bytes

Some additional refactoring might be a good idea here (since the jQuery Update code for the CDN is written in general to assume dependencies that don't necessarily exist, not just for this specific case)... but here is a simple patch that fixes the bug with the Effects library directly.

David_Rothstein’s picture

StatusFileSize
new705 bytes

Updated the patch to apply to the latest 7.x-2.x code.

a.knutson’s picture

#2 works for me! Thanks for sharing David.

killua99’s picture

Status: Needs review » Reviewed & tested by the community

Also for me . When it's going to be pushed into the dev or stable branch ??

deanflory’s picture

patching file jquery_update.module
Hunk #1 succeeded at 390 (offset 57 lines).

This is with jquery_update 7.x-2.x-dev 2013-Sep-30

FYI, to users of the back_to_top module, it won't work at this time with this jquery_update #2 patch above applied.

ericduran’s picture

Status: Reviewed & tested by the community » Fixed

Great find.

This is now fixed. Proper commit credit given to @David_Rothstein.

--
http://drupalcode.org/project/jquery_update.git/commit/e33325b

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.