2

I have this error :

Refused to apply style from 'http://www.portailclient-dev.com/pub/static/version1528816010/frontend/My/Theme/fr_FR/css/custom-m.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

In my default_head_blocks.xml, I have this (my theme extends luma) :

<head>
 <meta name="viewport" content="width=device-width, initial-scale=1"/>
 <css src="mage/calendar.css"/>
 <css src="css/custom-m.css"/>
 <script src="requirejs/require.js"/>
 <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
 </head>

I do i fix this?

EDIT

The solution :

change <css src="css/custom-m.css"/> to <css src="Magento_Theme::css/custom-m.css"/>

Vivek Kumar
5,7932 gold badges26 silver badges55 bronze badges
asked Jun 12, 2018 at 15:17
1
  • Please post the solution as answer and accept it. Commented Jun 12, 2018 at 20:52

1 Answer 1

3

There could be 2 reasons

  1. Your theme is not deployed for specific store view. You can try to deploy the theme for that specific store view like this

php bin/magento setup:static-content:deploy fr_FR -f

  1. Please check and insure that you have .htaccess file in your pub/static/ folder. Also if you are working on Linux please check the file permission.
answered Jun 12, 2018 at 17:49
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.