cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3: admin blank error

Magento 2.3: admin blank error

Admin showing blank page after installation step in Magento 2.3.0 using composer. I am installing magento on localhost xamp server.

 

any solution ?

6 REPLIES 6

Re: Magento 2.3: admin blank error

Hello @PankajS_Magento 

 

Please follow below shared solution:

 

...\vendor\magento\framework\View\Element\Template\File\Validator.php

A function isPathInDirectories added a line

$realPath = str_replace('\\', '/', $realPath);

or refer below code function  

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

Let me know if still face issue.

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

Re: Magento 2.3: admin blank error

Can you show here error from error.log, exception.log, system.log here?

-----
If Issue Solved, Click Kudos and Accept As solutions.
Sohel Rana, 7x Magento 2, 2x Magento 1 Certified

Re: Magento 2.3: admin blank error

Hello @PankajS_Magento 

 

Please follow the steps at Solved: Magento 2.2.7 and 2.3 Admin Page Blank Issue for the solution.

 

Hope it helps Smiley Happy

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: Magento 2.3: admin blank error

Manish Mittal's solution works.

 

Also another solution as below.

 

Please go to the Validator.php file location here.

 

...\vendor\magento\framework\View\Element\Template\File\Validator.php

Find a function function isPathInDirectories and add below line inside foreach loop.

 

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

So final code will be like as below.

 

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

Hope it helps.

 

If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: Magento 2.3: admin blank error

This solution worked for me but not fully. Below are the issues I got

  • Admin page loaded but AXAX loader is nAdmin_Loading.PNGReviews.PNGcart.PNGot going. Hence, you cant access none of the features (See attached image). 
  • "Add To Cart" button by default disabled. Can't add products to the cart
  • Few images are not loading. Like logo, icons (rating, cart, etc...)...See attached image.

Can anyone have a solution to fix it? Thanks in advance.

--

Pradeep

Re: Magento 2.3: admin blank error

Are you running windows?

If so find the file di.xml in 

<path to magento 2>\app\etc\di.xml

and replace the line

 

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

with

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

to run Magento 2 in Windows you need to edit both the  di.xml and the Validator.php as mentioned above