⭐ If you would like to buy me a coffee, well thank you very much that is mega kind! : https://www.buymeacoffee.com/honeyvig Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Tuesday, November 4, 2025

Solved: Magento 2.2.7 and 2.3 Admin Page Blank Issue

 

Magento 2 CMS is a suitable platform to run E-commerce business and it can be administered via admin panel. Admin is responsible for the functionalities of the store and any error in the admin panel is not acceptable. However, the clients have been facing the issue of the blank page in the admin panel after upgrade or installation of Magento 2.2.7 and Magento 2.3!

Developers at Meetanshi have been solving this issue and decided to post it as a solution for all the store owners of Magento 2.2.7 and Magento 2.3.

If you have recently upgraded or installed the latest version and face the Magento 2.2.7 and 2.3 admin page blank issue as shown below, follow the solution given in the post.

magento 2.3 and Magento 2.2.7 admin page blank issue

Solution to Magento 2.2.7 and 2.3 Admin Page Blank Issue:

How to solve the Magento 2.2.7 admin page blank issue:

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

You’ll find this 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; }

which is to be replaced 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; }

How to solve the Magento 2.3 admin page blank issue:

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

Find the below string:

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

and replace it with:

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

Is’nt the solution easy to implement? So now you can upgrade to Magento 2 latest version without any issues!

Happy Administrating!

No comments:

Post a Comment