How To Fix Blank Admin Page On Magento 2.3 In Windows

Magento 2 may appear many errors after installation. Follow How to fix blank admin page on Magento 2.3 in Windows to get the best fix from us!

Fix Blank Admin Page On Magento 2.3

This is the first error you will encounter when installing Magento 2.3 in Windows!

Fix error M2 Admin Panel

The reason for the invalid template file is the difference between the use of “/” and “\” in the path. Windows uses “/” while Magento uses “\”.

The exception dialog box will appear like this:

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: ‘E:/Working/xampp/htdocs/magento233sd/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml’ in module: ‘Magento_Backend’ block’s name: ‘require.js’

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: ‘E:/Working/xampp/htdocs/magento233sd/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml’ in module: ‘Magento_Backend’ block’s name: ‘require.js’

#1 Magento\Framework\View\Element\Template->_toHtml() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1097]
#2 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1101]
#3 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor\magento\framework\View\Element\AbstractBlock.php:671]
#4 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor\magento\framework\View\Result\Page.php:249]
#5 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#00000000539c0a3500000000105dec46#) called at [vendor\magento\framework\View\Result\Layout.php:171]
#6 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000539c0a3500000000105dec46#) called at [generated\code\Magento\Backend\Model\View\Result\Page\Interceptor.php:193]
#7 Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000539c0a3500000000105dec46#) called at [vendor\magento\framework\App\Http.php:141]
#8 Magento\Framework\App\Http->launch() called at [generated\code\Magento\Framework\App\Http\Interceptor.php:24]
#9 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\magento\framework\App\Bootstrap.php:261]
#10 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000539c0a3e00000000105dec46#) called at [index.php:39]

To fix it, go to the Magento folder you have installed.

Next, go to vendor->magento->framework->View->Element->Template->File->Validator.php

You find the code line:

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

Then replace to:

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
replace to new command line

Note: We recommend that you keep the old code line for future use. To hide it, use “//” before the code line.

Thus, the error of the Invalid template file has been completely fixed.

Fix page loading, incomplete load, long load

admin panel load
admin panel load 1
store page load

If you see your store page and admin panel page get this error, follow these instructions:

First, Open Shell in XAMPP.

open shell in xampp

Next, You then navigate to your magento installation folder with the cd command.

For example, cd htdocs\magento233sd

xampp shell navigate to magento folder

Then, you use the deploy command:

php bin/magento setup:static-content:deploy -f
shell xampp run deploy

And wait for it to run complete.

xampp shell run deploy complete

Now, Reload the frontend page and admin panel page and feel.

reload frontend
reload admin panel

If your store page is not yet fully displayed, run this command:

php bin/magento cache:flush

So Magento 2 on your localhost is already running! Good luck!

You can view the article How To Install Magento 2.3 In Windows Using XAMPP and How To Install Extension Magento 2.

This is How to fix blank admin page on Magento 2.3 in Windows.

Follow us for more helpful article!

We hope this is useful blog for you.

Thank you for reading!

5 1 vote
Article Rating

Aaron LX

Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.

Leave a Reply or put your Question here

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x