Admin showing blank page after installation step in Magento 2.3.0 using composer. I am installing magento on localhost xamp server.
any solution ?
Hello @PankajS_Magento
Please follow below shared solution:
...\vendor\magento\framework\View\Element\Template\File\Validator.php
A function isPathInDirectories added a line
$realPath = str_replace('\\', '/', $realPath);
or refer below code function
protected function isPathInDirectories($path, $directories) { if (!is_array($directories)) { $directories = (array)$directories; } $realPath = $this->fileDriver->getRealPath($path); $realPath = str_replace('\\', '/', $realPath); // extra code added foreach ($directories as $directory) { if (0 === strpos($realPath, $directory)) { return true; } } return false; }
Let me know if still face issue.
Can you show here error from error.log, exception.log, system.log here?
Hello @PankajS_Magento
Please follow the steps at Solved: Magento 2.2.7 and 2.3 Admin Page Blank Issue for the solution.
Hope it helps ![]()
Manish Mittal's solution works.
Also another solution as below.
Please go to the Validator.php file location here.
...\vendor\magento\framework\View\Element\Template\File\Validator.php
Find a function function isPathInDirectories and add below line inside foreach loop.
$directory = $this->fileDriver->getRealPath($path);
So final code will be like as below.
protected function isPathInDirectories($path, $directories)
{
if (!is_array($directories)) {
$directories = (array)$directories;
}
$realPath = $this->fileDriver->getRealPath($path);
foreach ($directories as $directory) {
$directory = $this->fileDriver->getRealPath($path); //-This line added.
if (0 === strpos($realPath, $directory)) {
return true;
}
}
return false;
}Hope it helps.
If you've found my answer useful, please give"Kudos" and "Accept as Solution"
This solution worked for me but not fully. Below are the issues I got
Can anyone have a solution to fix it? Thanks in advance.
--
Pradeep
Are you running windows?
If so find the file di.xml in
<path to magento 2>\app\etc\di.xml
and replace the line
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
with
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
to run Magento 2 in Windows you need to edit both the di.xml and the Validator.php as mentioned above