2

Refused to apply style from

http://localhost/magento2-2.3.5-p1/pub/static/version1593595791/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css


because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

  • frontend loaded successfully or not? – Rasik Miyani Jul 6 at 5:51
  • Some icons are missing..but loaded the front end. – Sonali Ghule Jul 6 at 5:59
  • Magento installed fresh? – Rasik Miyani Jul 6 at 6:06
  • Yes.I have installed the fresh magento.Admin is unable to load. – Sonali Ghule Jul 6 at 6:07
  • please check my aswer – Rasik Miyani Jul 6 at 6:15
2

Step -1 Go To Magento\Framework\View\Element\Template\File\Validator.php

replace isPathInDirectories() Method

protected function isPathInDirectories($path, $directories)
    {
        $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
        if (!is_array($directories)) {
            $directories = (array)$directories;
        }
        foreach ($directories as $directory) {
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }
        return false;
    }

Step -2 Run command

php bin/magento c:f
php bin/magento s:s:d -f

I hope this is helpful to you!!

| improve this answer | |

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.