Magento 2.3 admin not working

Posted at: December 10, 2018 1:13 PM

Issue Fixed: Magento 2.3 admin not working

Showing below this error in console.

This issue is coming due to directory seprator

In $path variable value is coming with Forward Slash: / like this

D:/xampp/htdocs/mage23/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml

And this code $realPath = $this->fileDriver->getRealPath($path); converts $path variable value with Backslash: \ like this

D:\xampp\htdocs\mage23\vendor\magento\module-backend\view\adminhtml\templates\page\js\require_js.phtml

In this file \vendor\magento\framework\View\Element\Template\File\Validator.php result is not matched in method isPathInDirectories and this method return false because $directory variable get value with Forward Slash: / so error is coming.

D:/xampp/htdocs/mage23/var/view_preprocessed/pub/static/

Solution:

So also set $directory variable with real path using method getRealPath() and solve this issue by adding this line $directory = $this->fileDriver->getRealPath($directory); in foreach loop.

Please see below code for solution

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

Main code

Replace with below code

You can watch video on Magento 2.3 admin not working


Magento 2.3 Admin Login

Please leave comments

1 Comments

truecodex launched free android app. You can download and install truecodex app on your mobile and get notification of the latest post.

Video Tutorials on YouTube