I'm not sure if this is a mime-type related issue with my server configuration or an error with this module, but I'm getting the following error message in the Chrome console for most pages on my site:
Failed to load resource: the server responded with a status of 404 (Not Found)
libraries/fontawesome/fonts/fontawesome-webfont.woff2?v=4.3.0
I've attached an image of both the console error message as well as the Drupal log message. I noticed that this module automatically pulls the library from a cdn, so there isn't really an easy way for me to prevent the css file from trying to load the woff2 file, but the better approach I feel is for me to simply figure out what's causing the error and fix it straight away.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2015-02-08 at 11.43.18 AM.png | 189.36 KB | JakeWilund | |
Screen Shot 2015-02-08 at 11.42.44 AM.png | 25.38 KB | JakeWilund |
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedWhen I copied the url from firebug to the task bar the characters changed:
The url should be the following which is downloadable
but in the browser bar I get:
This happens only when js/css aggregation is turned on
Comment #2
tobey_p CreditAttribution: tobey_p commentedSubscribe
Comment #3
tobey_p CreditAttribution: tobey_p commentedSeems like library support is broken. After updating to 7.x-2.1 font files are only requestes from "/sites/all/themes/exampletheme/fonts/"
instead of "/sites/all/libraries/fontawesome/fonts/"
Comment #4
agoradesign CreditAttribution: agoradesign commented@JakeWilund: It is a mime-type related issue with your server configuration. I've recognised this error today too, after updating the library to 4.3.0. After I modified server configuration, the file is served correctly!
@tobey_p: I've never experienced this problem. I'm also on 2.1 with some sites.
I leave the issue open, but if you agree, one should close it as "works as designed"
Comment #5
SocialNicheGuru CreditAttribution: SocialNicheGuru commented@agoradesign can you elaborate on your server config which solved this?
Comment #6
agoradesign CreditAttribution: agoradesign commentedWell, I fear that this won't help you very much. Because the site is hosted on platform.sh, where you don't/can't directly edit .htaccess files, but have the possibility to do some similar configuration in a yaml file. I've just added
- \.woff2$
to the whitelist section as shown here: https://github.com/platformsh/platformsh-examples/blob/symfony/todo-mvc-...On a normal apache server with possibility to edit .htaccess I'd give it a try to add the following line (but this is untested):
AddType application/font-woff woff woff2
Comment #7
JakeWilund CreditAttribution: JakeWilund commented@agoradesign
Thank you! Your suggestion was exactly the fix I was looking for.
Comment #8
inders CreditAttribution: inders commentedThanks all for great follow up ! Closing ticket as per previous comments. Please note we are using "font-awesome-4.4.0" in 7.x-2.1 version. feel free to reopen if issue still exists. Thank you !
Comment #9
derekrezek CreditAttribution: derekrezek commentedthis should help:
http://stackoverflow.com/a/16708953/3198192