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.
Reasoning: http://zoompf.com/blog/2012/05/html5shiv-and-serving-content-from-code-r...
The instructions at Google code were recently updated as well, and no longer recommend linking to the Google code repository, especially since development is now happening in a GitHub repository. Not that we should be linking to the GitHub repository :)
Patch against 7.x-3.x-dev attached.
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff.txt | 4.96 KB | star-szr |
#6 | don_t_serve_html5shiv-1595062-6.patch | 3.12 KB | star-szr |
Comments
Comment #1
star-szrThis is fixed in 7.x-4.x, so this is probably a won't fix for 7.x-3.x. Maintainers, what do you think?
Comment #2
Simon Georges CreditAttribution: Simon Georges commented4.x is still not the recommended version, so I suppose this should be fixed for users that are using the 3.x version (like production websites).
Are there issues when upgrading from 3.x to 4.x version?
Anyway, as there is a patch, changing status to needs review.
Comment #4
gabyyy CreditAttribution: gabyyy commentedomega-html5shiv-local.patch queued for re-testing.
Comment #4.0
gabyyy CreditAttribution: gabyyy commentedUpdated issue summary.
Comment #5
mforbes CreditAttribution: mforbes commentedThe patch uses
path_to_theme()
which is problematic. I've seen folks report certain issues wherepath_to_theme()
returns the base theme when they expected it to return the active theme, but I'm actually experiencing the opposite problem: I subthemed Omega, andpath_to_theme()
in the context of html.tpl.php is the path to my subtheme. I do not include js/html5shiv.js in my subtheme, nor should I need to, so the resulting path is a 404 Not Found. The subtheming guide does not suggest unnecessarily duplicating assets from the base theme.This bit of documentation clarifies why, in this particular context of html.tpl.php,
path_to_theme()
is returning my subtheme rather than Omega or Alpha: "When called outside the scope of a theming call, it will always point to the active theme." (https://api.drupal.org/api/drupal/includes%21theme.inc/function/path_to_...)What do you think about swapping out
path_to_theme()
fordrupal_get_path('theme', 'omega')
? The path to html5shiv.js is always composed from the path to Omega, despite Omega both having a base theme and being a base theme for something else.Comment #6
star-szrYup, +1 that makes sense to hardcode that way @mforbes. Attaching a new patch and interdiff - I also grabbed the latest html5shiv.js via the Google code URL.
Comment #7
davidwatson CreditAttribution: davidwatson as a volunteer commentedLooks solid. One more for RTBC?
Comment #8
alan-ps CreditAttribution: alan-ps commented#1 tested and works well!