6

After installing Magento 2.3, When I am trying to open the admin panel login screen is blank and my console contains an error as shown in the image. if anyone has a solution then please let me know. below is image that show error

Purushotam Sharma
  • 1,657
  • 2
  • 26
  • 59
Nima Patel
  • 63
  • 1
  • 1
  • 3

1 Answers1

22

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

find:

foreach ($directories as $directory) {
    if (0 === strpos($realPath, $directory)) {
        return true;
    }
}

Replace with:

foreach ($directories as $directory) {
    $realDirectory = $this->fileDriver->getRealPath($directory);
    // and replace `$directory` with `$realDirectory`
    if (0 === strpos($realPath, $realDirectory)) {
        return true;
    }
}
Abhishek Panchal
  • 4,948
  • 3
  • 21
  • 38
Manoj Pal
  • 1,047
  • 8
  • 18