1

I'm fairly new to Magento 2 and have been attempting to add a copy on my local machine (operating system: Windows 10) so that I can try out some database migration tests.

I have installed XAMPP and proceeded with the installation instructions. I was then rewarded with the following screen:

enter image description here

The actual site address seems to open a follows:

enter image description here

However when I click on "Launch Magento Admin" I get taken to a blank screen:

enter image description here

I've opened the developers console to see if anything is wrong and the following errors seem to be in effect:

enter image description here

Looking at this, I would think that this is an effect of the adminhtml styles not being loaded.

Regardless, does anyone know how I can fix this?

1 Answer 1

1

Yes, This is the problem with windows. Windows uses "\" as separator, the array "directories" contains entries with "/" as separator, so the check will always fail.

So you need to fix this by replacing the separator in core file:

Magento\Framework\View\Element\Template\File\Validator

function isPathInDirectories replace below code in isPathInDirectories function

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
4
  • This is a quick fix and may be Magento will provide a patch to fix this issue. Commented Jan 9, 2019 at 13:47
  • Hi. Thanks @SaurabhDwivedi but I'm afraid that this hasn't resolved the issue. I'm still receiving the errors.
    – CJNotts
    Commented Jan 9, 2019 at 14:37
  • Run command : php bin/magento setup:upgrade and then php bin/magento setup:static-content:deploy Also can you send new error report again. Commented Jan 9, 2019 at 14:40
  • That seems to have done the trick. Thank you very much!
    – CJNotts
    Commented Jan 9, 2019 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.