4

Sceen Shot.

After install with no error , admin blank screen but it gives error on console on browser.

Screen Shot

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
saral company
  • 41
  • 1
  • 2
  • Here is the solution. https://stackoverflow.com/questions/53551878/blank-admin-page-on-magento-2-3-0-ce-in-localhost – Andrey Rad Dec 06 '18 at 19:20
  • I'm voting to close this question as off-topic because Stack Overflow is a [programming-related](http://stackoverflow.com/help/on-topic) Q&A site. Your question is not about programming. Perhaps you should post it on http://magento.stackexchange.com instead? – Enigmativity Dec 08 '18 at 09:20
  • First solution there worked for me. [After installing magento 2.3 admin login page cant open properly](https://magento.stackexchange.com/questions/252069/after-installing-magento-2-3-admin-login-page-cant-open-properly) – Shahzaib Hayat Khan Mar 15 '19 at 17:44

3 Answers3

2

Please follow instructions below. I hope it will resolve your issue.

Just go to vendor/magento/framework/View/Element/Template/File/Validator.php and find function function isPathInDirectories line 138.

Replace:

$realPath = $this->fileDriver->getRealPath($path);
        foreach ($directories as $directory) {
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }

With:

$realPath = $this->fileDriver->getRealPath($path);
        foreach ($directories as $directory) {
            $directory = $this->fileDriver->getRealPath($path);  //Add this line.
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }
Elletlar
  • 3,136
  • 7
  • 32
  • 38
Anwar
  • 43
  • 9
0

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.

0

In lib\internal\Magento\Framework\View\Element\Template\File\Validator.php

Replace

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

With

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

Then Run this in your terminal:

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
Colin Gell
  • 372
  • 1
  • 13