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.
jQuery 1.x is gone. Replace the uncompressed jquery-1.4.4 version with uncompressed jquery-2.1.3. Are also needed some changes in devel_library_alter
Comment | File | Size | Author |
---|---|---|---|
#5 | devel-jquery-uncompressed-2409725-5.patch | 439.17 KB | willzyx |
#1 | devel-jquery-uncompressed-2409725-1.patch | 438.66 KB | willzyx |
Comments
Comment #1
willzyx CreditAttribution: willzyx commentedComment #2
pcambraComment #3
pcambraI think it should be hook_library_info_alter instead, according to this change record https://www.drupal.org/node/2391981
Comment #4
willzyx CreditAttribution: willzyx commentedGood catch. I'm investigating but I have some doubts about the best way to handle it..
Option 1 : replace jquery with our uncompressed version only if we found the file shipped with core.
Pro: the security that we are replacing the right file.
Cons: hardcoded jquery path, works only with jquery file shipped with core.
Option 2 : work with first element of $libraries['jquery']['js'] array.
Pro: no hardcoded path, works with already altered library
Cons: no security that we are replacing the right file. Some other module may have altered the library and changed the js array (is it realistic?)
I am inclined to the first option.. @pcambra what do you think about?
Comment #5
willzyx CreditAttribution: willzyx commentedI followed the first option
Comment #6
willzyx CreditAttribution: willzyx commented@pcambra can you review, please? :)
Comment #7
pcambraI guess that if jquery update or something similar is used for Drupal 8, we might encounter a conflict, but this might be good for now.
Comment #8
willzyx CreditAttribution: willzyx commentedMarking RTBC. See if anyone has objections, if not I'll commit it.
Comment #9
pcambraI'm fine with it, but let's keep an eye on it to see if core provides a better way to do this at some point.
Comment #11
willzyx CreditAttribution: willzyx commentedI'll keep an eye on it to see if core provides a better way to do this