cancel
Showing results for 
Search instead for 
Did you mean: 

backend blank localhost

backend blank localhost

i've tried to install magento in localhost with xamp. the installation went well but when I try to go to the backend only the dark background appears and nothing else.

In console i see that:

La risorsa da “http://localhost/magento/pub/static/version1587840129/adminhtml/Magento/backend/it_IT/extjs/resources/css/ext-all.css” è stata bloccata a causa della mancata corrispondenza (“text/html”) del tipo MIME (X-Content-Type-Options: nosniff).e9765aa7f1c3acc8d5f1716d1e9ff09bd231bed3a3bf138d797335cc32018807

 Can someone help me?,

thanks

6 REPLIES 6

Re: backend blank localhost

Hi @paoloadver279e 

Download the .htaccess file for your specific magento version and put it inside the pub/static folder in the default magento directory and these errors should vanish. Also check the root directory .htaccess file.


I also faced a very similar issue. After a lot of deliberation I was able to understand that this problem mainly occurred because I deleted the .htaccess file inside the pub/static folder.

I hope it will help you!

Re: backend blank localhost

Hello @paoloadver279e 

 

This is Magento bug. Wrong paths are generated. Please follow below shared solution

 

Magento 2.3

#/vendor/magento/framework/View/Element/Template/File/Validator.php:114

the string

$realPath = $this->fileDriver->getRealPath($path);

to replace

$realPath = str_replace('\', '/', $this->fileDriver->getRealPath($path));

Magento 2.2

/vendor/magento/framework/View/Element/Template/File/Validator.php:113

code

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

to replace

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;
    }

 

Manish Mittal
https://www.manishmittal.com/

Re: backend blank localhost

I have replaced the file but nothing has changed..

Re: backend blank localhost

Hello @paoloadver279e 

please refer to the following link for the solution 
https://meetanshi.com/blog/solved-magento-2-2-7-and-2-3-admin-page-blank-issue/

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: backend blank localhost

Howdy @paoloadver279e Download the .htaccess record for your particular magento form and put it inside the bar/static organizer in the default magento index and these mistakes ought to disappear. Likewise actually take a look at the root registry .htaccess record. I additionally confronted a fundamentally the same as issue. After a ton of consideration I had the option to comprehend that this issue fundamentally happened on the grounds that I erased the .htaccess document inside the bar/static envelope. I trust it will help you!

Re: backend blank localhost

Hello @paoloadver279e

Download the .htaccess document for your particular magento form and put it inside the bar/static organizer in the default magento registry and these blunders ought to disappear. Likewise actually look at the root catalog .htaccess record.

I additionally confronted a very much like issue. After a ton of thought I had the option to comprehend that this issue predominantly happened on the grounds that I erased the .htaccess document inside the bar/static organizer.

I trust it will help you!