I have a Magento 2 store and everything was ok with the default theme. Then I installed Porto theme and now I get this errors in the console and the page (especially the top menu) doesn't load properly:

The Content-Security-Policy directive 'frame-ancestors' does not support the source expression ''unsafe-inline''

Refused to apply style from 'https://example.com/media/porto/configed_css/settings_default.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

As a web server I'm using Nginx.

I tried running this commands after theme installation but I'm still getting the same errors:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex 
php bin/magento cache:flush

Any ideas on what I could further do to fix this?

Thank you!

  • Is the CSS file in the "media" folder? Jul 4, 2022 at 15:38
  • @MagePalExtensions no, the folder is empty
    – Melody
    Jul 4, 2022 at 15:39


Your Answer

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

Browse other questions tagged or ask your own question.