cancel
Showing results for 
Search instead for 
Did you mean: 

Strict Mimetype Checking

Strict Mimetype Checking

To whom it may concern:

I downloaded magento CE 2.3.4 and installed it. (after database creation and etc).

Neither the admin path nor front end works properly, browser console gives Strict Mimetype Checking enabled error which causes lots of .js files not to be loaded. 

I gather the problem could be fixed via .htaccess file, yet this is magento a remarkable CMS,

this should  not be happened. Operating system is win 10 pro, server is wamp.

Kian William

1 REPLY 1

Re: Strict Mimetype Checking

Hey @kian william_no 

 

Change the above foreach loop to run our Magento with no further issues on this:

 

#/vendor/magento/framework/View/Element/Template/File/Validator.php:139
foreach ($directories as $directory) {
// Add this line
$realDirectory = $this->fileDriver->getRealPath($directory);
// and replace `$directory` with `$realDirectory`
if (0 === strpos($realPath, $realDirectory)) {
return true;
}
}

I hope it helps.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.