Thursday, August 30, 2018

CSS is not loading on Magento 2 site

Refused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”

Refused to apply style from 'https://xxxxxxxxxxxx.com/pub/static/version1502029409/adminhtml/Magento/backend/en_US/css/styles-old...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."


The problem was solved when I re-deployed the assets for admin pages.
I run these commands:
  1. grunt clean; grunt exec; grunt less
  2. bin/magento setup:static-content:deploy -f -s standard
  3. bin/magento cache:clean
Maybe, the CSS has to be re-deployed whenever the Sales email templates are updated.

No comments: