sunnykumar
sunnykumar

Reputation: 43

Magento 2.3 it's not working properly in localhost

I have installed Magento 2.3 in my localhost and it's a successfully installed. But When I open an admin URL it comes with blank URL. Also, my homepage comes without Magento default logo. And i am facing another issue on homepage When I clicked on to create an account it redirects successfully but it comes with a blank page.

enter image description here

Please see attached images for better ideas.

enter image description here

Upvotes: 1

Views: 2216

Answers (3)

Syed Abuthahir
Syed Abuthahir

Reputation: 1

I am also facing the same issue while installing Magento 2.3.3 in my localhost - XAMPP Server. It's successfully installed, but when I opening the admin panel, it appeared a blank screen like the below image. Admin Panel

The Solution is:

After that, I changed the code like below.

Go to this Path: ..\vendor\magento\framework\View\Element\Template\File then Open this file Validator.php

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

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

Image for reference to change the Validator.php file

Now Admin Panel will appear successfully.


Admin Panel appeared, but the issue is Magento logo does not appear on the login screen. After logging the admin Admin Panel, Icons don't appear on the dashboard also its continuously loading like the below images Icon Don't Appear

The solution is:

Go to this Path: ..\app\etc then Open this file di.xml

Then search this line Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

To Replace the line Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

Check this image for replacing the code & Make sure the code should come like this image

Now Go to the Admin Panel and Refresh the page. It's Successfully working without issues. All icons have appeared also Logo is appeared.

Admin Panel Sucess image

Now Go to Client Area, if you update sample content, the page looks like this image Client Page with Sample Content. Otherwise, it will appear like "CMS homepage content goes here".

Everything is working good.

I hope it will use to solve this issue.

Upvotes: 0

sunnykumar
sunnykumar

Reputation: 43

@Dhruv after using the command indexing:reindex the Homepage works perfectly.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin>cd..

C:\Users>cd..

C:\>cd xampp\php

C:\xampp\php>php C:\xampp\htdocs\Magento3\bin\magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:06
Customer Grid index has been rebuilt successfully in 00:00:02
Category Products index has been rebuilt successfully in 00:00:03
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:09
Product EAV index has been rebuilt successfully in 00:00:03
Stock index has been rebuilt successfully in 00:00:01
Inventory index has been rebuilt successfully in 00:00:01
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:02
Catalog Search index has been rebuilt successfully in 00:00:05

C:\xampp\php>

Upvotes: 0

Dhruv Tyagi
Dhruv Tyagi

Reputation: 812

I think this small hack will help you. i remebered i had an same issue some time back so may be this one will help you. You have to change some code in Validator.php. In the Validator.php there is one method(isPathInDirectories) so you have to change the below line

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

to

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

Path : ...vendor\Magento\Framework\View\Element\Template\File\Validator.php

Upvotes: 2

Related Questions