0

This question already has an answer here:

I just installed magento 2.3 in windows/wamp but it is not working.

The admin page is blank and the login/registration page also fails to load.

this is the home page enter image description here

The solution provided here does not work:

i believe the problem relates to incorrect syntax in the constructor of the directories validators i.e:

\vendor\magento\framework\View\Element\Template\File\Validator.php

 public function __construct(
        \Magento\Framework\Filesystem $filesystem,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
        ComponentRegistrar $componentRegistrar,
        $scope = null,
        ?FileDriver $fileDriver = null
    ) {
        $this->_filesystem = $filesystem;
        $this->_isAllowSymlinks = $scopeConfigInterface->getValue(self::XML_PATH_TEMPLATE_ALLOW_SYMLINK, $scope);
        $this->_themesDir = $componentRegistrar->getPaths(ComponentRegistrar::THEME);
        $this->moduleDirs = $componentRegistrar->getPaths(ComponentRegistrar::MODULE);
        $this->_compiledDir = $this->_filesystem->getDirectoryRead(DirectoryList::TMP_MATERIALIZATION_DIR)
            ->getAbsolutePath();
        $this->fileDriver = $fileDriver ?: \Magento\Framework\App\ObjectManager::getInstance()->get(FileDriver::class);
    }

please observe the incorrectly formatted last entry: ?FileDriver $fileDriver = null

This $this->fileDriver is required in the validator function, however since its incorrectly formatted its crashing my system.

please observe the method: isPathInDirectories($path, $directories)

this require the fileDriver i.e -

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

marked as duplicate by sv3n, Jai, Manashvi Birla, Sukumar Gorai, Dhiren Vasoya Dec 10 '18 at 10:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    @sv3n that solution does not work. i have tried it – theSeeker Dec 6 '18 at 17:01

Browse other questions tagged or ask your own question.