Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save erik4github/a593af924fd91fcb09f25eb11cf167b3 to your computer and use it in GitHub Desktop.
Save erik4github/a593af924fd91fcb09f25eb11cf167b3 to your computer and use it in GitHub Desktop.
In case you can't use Docker

Fix symlinks (2.3)

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

    protected function isPathInDirectories($path, $directories)
    {
        if (!is_array($directories)) {
            $directories = (array)$directories;
        }
        $realPath = $this->fileDriver->getRealPath($path);
        foreach ($directories as $directory) {
            // Add this variable -  Temp fix for windows
            $realDirectory = $this->fileDriver->getRealPath($directory);
            // $realDirectory in this loop is normally $directory
            if (0 === strpos($realPath, $realDirectory)) {
                return true;
            }
        }
        return false;
    }

Permissions

For generated folder:

icacls generated* /grant Administrator:F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment