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.
In modernizr.module in the dev version, if you try loading it from libraries with the name modernizr.min.js, you get a 404. That is because in this line:
$version_agnostic_path = file_exists($path .'/modernizr.min.js') ? $path : FALSE;
file_exists() finds the file, but then $version_agnostic_path is set to just $path, without the filename concatenated.
I'll submit a patch with a fix, it should look like this to properly load the file:
$version_agnostic_path = file_exists($path .'/modernizr.min.js') ? $path .'/modernizr.min.js' : FALSE;
Comment | File | Size | Author |
---|---|---|---|
#2 | modernizr-file-404-2184717-2.patch | 1.62 KB | TravisCarden |
#1 | modernizr-file-404-2184717-553729.patch | 1.05 KB | sarahjean |
Comments
Comment #1
sarahjean CreditAttribution: sarahjean commentedComment #2
TravisCarden CreditAttribution: TravisCarden commentedHere's a backport of the patch against 6.x-1.0, so anyone can use this in a Drush make file or anything if they're running the latest stable release. (@sarahjean's patch can be committed right to the dev version.)
Comment #3
ruplThanks for reporting the issue!
I'll be honest, I haven't touched D6 in years. If you can get people to test this all the way up to RTBC I'll commit it.
Comment #4
sarahjean CreditAttribution: sarahjean commentedThanks, I know its not a priority with d8 about to come out!
Comment #5
nickfitz CreditAttribution: nickfitz commentedThis patch actually fixed a huge issue for me. I tested it and everything worked as expected. Thanks!
Comment #6
ruplHi nickfitz, since you tested the patch and confirmed it is working, could I ask that you set this as RTBC? I'll commit it and make a new release for your effort ;)
Comment #7
bryanbraun CreditAttribution: bryanbraun commentedI just tested this as well... both the patch from #1 on 6.x-1.x and the patch from #2 on 6.x-1.0. I can confirm that they both work as expected.
Happy to set this to RTBC on behalf of nickfitz. ;)
Comment #8
ruplCommitted to dev and tagged a new release!
https://drupal.org/node/2189043
Comment #9
sarahjean CreditAttribution: sarahjean commentedAwesome, thanks for taking a look at it.