Magento 2.3 admin blank error fix

What do to if you notice when opening Magento admin or frontend that page is empty … also when moving around subpages

Something similar like this

  1. Go to Magento installation root folder.
  2. Then lib->internal->Magento->Framework->View->Element->Template->File->Validator.php
  3. Go to line number 140 and replace the below code

From

If(0 === strpos($realPath, $directory)) {
	return true;
}Code language: PHP (php)

To

$realDirectory = $this->fileDriver->getRealPath($directory);
	if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
    return true;
}Code language: PHP (php)

Then reload the page admin and frontend issue will resolved.

Leave a comment

Your email address will not be published. Required fields are marked *