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.

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

1 Answer 1

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!!

3

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.

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