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"/>
-
Please post the solution as answer and accept it.Vivek Kumar– Vivek Kumar2018年06月12日 20:52:55 +00:00Commented Jun 12, 2018 at 20:52
1 Answer 1
There could be 2 reasons
- 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
- 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.