1

We’re using Craft over SSL and everything is working fine apart from the admin fonts:

Admin settings with missing fonts

This is due to a mixed content, because craft.css is requesting the fonts from non-ssl URLs:

Non-ssl URLs

The CSS file requesting these non-ssl assets is:

/admin/resources/css/craft.css?d=1478612388

When I clear caches, everything works for one page load, then reverts to broken fonts on the next page load. This is because for one page load after clearing caches, the CSS file is requested with a different query string:

/admin/resources/css/craft.css?x=EVPBt6yJn

This file uses the correct SSL URLs for font files, as does any other variation on the query string.

I’ve tried completely emptying the storage directory.

I can’t find anything in the docs about how Craft generates these CSS files, or the query strings. Can anyone give me any pointers?

2 Answers 2

2

The fix in this particular case was to modify and save /craft/app/resources/css/craft.css — this revs the timestamp in the query string.

1

Craft will use whatever protocol (http/https) you've defined for your siteURL (either as the config setting) or in the control panel under Settings->General->Site URL.

It's also possible you've got some .htaccess URL rewrite rules interfering with those specific requests as well.

1
  • Hi Brad, thanks for the answer (and sorry for my slow response!). We’ve got the site URL set with https, and we’re using Nginx rather than Apache, it isn’t interfering with https requests at all — I can directly access the correct stylesheet at the correct address over SSL.
    – Andy
    Commented Nov 14, 2016 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.