Blog of King Software

Magento Admin Blank Screen & Logo Issue after Installation

MAGENTO ADMIN BLANK SCREEN & LOGO ISSUE AFTER INSTALLATION

Created by Bhavesh Gohil & Vicky Parekh on Date: 06/11/2020

After Installation of Magento 2 completed, your admin screen doesn't display properly & instead shows blank page.

E-Commerce in Ilford, Essex-Kingsoftware.

Below are the steps to resolve this problem.

STEP 1   :  

  • Go to the following path in the magento file directory
  • Path :/vendor/magento/framework/View/Element/Template/File/Validator.php
  • Go to line no.133, you will find the below code:
  • protected function isPathInDirectories($path, $directories)
    {
    if (!is_array($directories)) {
    $directories = (array)$directories;
    }
    $realPath = $this->fileDriver->getRealPath($path);
    foreach ($directories as $directory) {
    if (0 === strpos($realPath, $directory)) {
    return true;
    }
    }
    return false;
    }

    E-Commerce in Ilford, Essex-Kingsoftware.

    Replace the above code with the following code:

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

    E-Commerce in Ilford, Essex-Kingsoftware.

    Now reload the admin page in the browser to see if the problem is resolve.

    E-Commerce in Ilford, Essex-Kingsoftware.

    After that you seen that your blank screen issue was resolved, but still the logo on admin & main website pages didn't display as seen in the image.

    E-Commerce in Ilford, Essex-Kingsoftware.

    To resolve his problem follow the below steps:

    STEP 2   :  Go to xampp/htdocs/magento2/app/etc/di.xml and open di.xml file.

    E-Commerce in Ilford, Essex-Kingsoftware.
    • Search Symlink inside the di.xml file
    E-Commerce in Ilford, Essex-Kingsoftware.
  • Replace the word "Symlink" with "Copy" in the file and save it.
  • Now Reload the admin & homepages to see the logo.
  • E-Commerce in Ilford, Essex-Kingsoftware.

    E-Commerce in Ilford, Essex-Kingsoftware.