Magento 2.3.3 仪表板不断加载
Posted
技术标签:
【中文标题】Magento 2.3.3 仪表板不断加载【英文标题】:Magento 2.3.3 dashboard keeps loading 【发布时间】:2020-04-24 21:42:15 【问题描述】:我已经在我的本地主机中安装了最新版本的 magento。 登录到管理面板仪表板后继续加载。 这是图片-
请帮忙解决这个错误。
【问题讨论】:
【参考方案1】:首先进入magento根目录,然后:
vendor/magento/framework/view/element/tempalate/file/validator.php(不要完全复制这个url,只要按照这个路径)
使用任何编辑器打开此文件并更改此行
$realPath = $this->fileDriver->getRealPath($path); //you can comment this out
with this one
$realPath = str_replace('\\','/',$this->fileDriver->getRealPath($path));
then goto to
app/etc/di.xml
并搜索 view_preprocessed
你会发现一整行是这样的:
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink 并用 Copy
更改 Symlink【讨论】:
【参考方案2】:Magento 2.3
转到 \lib\internal\Magento\Framework\View\Element\Template\File
转到函数 isPathInDirectories 并将该函数替换为以下函数
protected function isPathInDirectories($path, $directories)
if (!is_array($directories))
$directories = (array)$directories;
//$realPath = $this->fileDriver->getRealPath($path);
$realPath = str_replace('\\','/',$this->fileDriver->getRealPath($path));
foreach ($directories as $directory)
//$realDirectory = $this->fileDriver->getRealPath($directory);
$realDirectory = str_replace('\\','/',$this->fileDriver->getRealPath($directory));
if ($realDirectory && 0 === strpos($realPath, $realDirectory))
return true;
return false;
转到 app/etc/di.xml 然后搜索 view_preprocessed
你会发现一整行是这样的:
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink 并更改为 Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
【讨论】:
【参考方案3】:#1。转到供应商/magento/framework/View/Element/Template/File/Validator.php# #2。转到函数 isPathInDirectories 并将函数替换为以下内容:#
protected function isPathInDirectories($path, $directories)
if (!is_array($directories))
$directories = (array)$directories;
//$realPath = $this->fileDriver->getRealPath($path);
$realPath = str_replace('\\','/',$this->fileDriver->getRealPath($path));
foreach ($directories as $directory)
//$realDirectory = $this->fileDriver->getRealPath($directory);
$realDirectory = str_replace('\\','/',$this->fileDriver->getRealPath($directory));
if ($realDirectory && 0 === strpos($realPath, $realDirectory))
return true;
return false;
#3。转到 app/etc/di.xml 然后搜索 view_preprocessed
你会发现一整行是这样的:
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink 并更改为 Magento\Framework\App\View\Asset\MaterializationStrategy\Copy #
【讨论】:
以上是关于Magento 2.3.3 仪表板不断加载的主要内容,如果未能解决你的问题,请参考以下文章