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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru’s picture

When I copied the url from firebug to the task bar the characters changed:

The url should be the following which is downloadable

http://mysite/profiles/openatrium/themes/oa_radix/assets/fonts/fontawesome-webfont.ttf?v=3.0.1

but in the browser bar I get:

http://mysite/profiles/openatrium/themes/oa_radix/assets/fonts/fontawesome-webfont.ttf%3Fv%3D3.0.1

This happens only when js/css aggregation is turned on

tobey_p’s picture

Subscribe

tobey_p’s picture

Seems 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/"

agoradesign’s picture

@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"

SocialNicheGuru’s picture

@agoradesign can you elaborate on your server config which solved this?

agoradesign’s picture

Well, 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

JakeWilund’s picture

@agoradesign

Thank you! Your suggestion was exactly the fix I was looking for.

inders’s picture

Status: Active » Closed (works as designed)

Thanks 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 !

derekrezek’s picture