I have a Magento 2 multi-website with each website has their own store view, after I upgrade it from 2.5 to 2.3.3, the main website is looking fine, but the others are broken and when I inspect, got an error like this:

(index):1 Refused to apply style from 'pub/static/_cache/merged/0cb08dac7714064caf47f5c9bb91fcb6.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

enter image description here

* I already deleted the pub/static/frontend and make sure the pub/static/.htaccess is there, and run:*

bin/magento cache:clean
bin/magento setup:static-content:deploy -f

but still got the same error

  • All other website has same locale? – DJ Dev Jan 2 '20 at 9:47
  • yes @DJDev using same locale – jojo Jan 2 '20 at 9:50
  • check the static files of which errors are thrown are present on the desired location or missing? – ASQ Jan 2 '20 at 12:26
  • can you run the upgrade, di:compile and then run the static-content:deploy – venkata prasad Jan 2 '20 at 12:33
  • @ASQ yes the file is exist in server pub/static folder – jojo Jan 3 '20 at 1:57

Your versioning is enabled due to this it is looking like that. So please run the following SQL query for the core_config table.

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

And run deploy command

bin/magento cache:clean
bin/magento setup:static-content:deploy -f

Give permission if required to var, generated and pub/static

For more information please check that reference for versioning issues.

Disable Versioning Magento 2

  • i already has this configuration , and its still the same error – jojo Jan 3 '20 at 1:54
  • rename the static directory inside the pub and run the deploy command. Give permission to pub/static once deploy command run succesfully – abhinay pratap singh Jan 3 '20 at 5:11

Run this command:

bin/magento cache:clean
bin/magento setup:static-content:deploy -f

And after -f, add lang corresponding with each of your website

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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