1

enter image description here

After successful installation when you open admin url, Admin panel showing black and also frontend links not working.

0
  1. Go to Magento installation root folder.
  2. Then lib->internal->Magento->Framework->View->Element->Template->File->Validator.php
  3. Go to line no 140 and replace the below code

From

If(0 === strpos($realPath, $directory)) {
            return true;
            }

To

$realDirectory = $this->fileDriver->getRealPath($directory);
            if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
            return true;
            }

Then reload the page admin and frontend issue will resolved.

0

Open Validator.php file from below path

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

Go to line number 140

Replace below code

If(0 === strpos($realPath, $directory)) {
    return true;
}

with below code

$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
    return true;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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