网站首页 / 资讯 / Magento教程/ Magento2.x教程

Magento2新安装的后台变灰,无法登录及正常使用

作者:admin

 出现这种情况的基本上是windows机做服务器的情况,一般是文件验证做怪

修改以下位置文件

M2.4.X  位置为  vendor\magento\framework\View\Element\Template\File\Validator.php
M2.3.1 位置为     lib\internal\Magento\Framework\View\Element\Template\File\Validator.php


找到下面的这一些并修改

改以下位置文件

  public function isValid($filename)
   {
       $filename = str_replace('\\', '/', $filename);
       if (!isset($this->_templatesValidationResults[$filename])) {
           $this->_templatesValidationResults[$filename] =
               ($this->isPathInDirectories($filename, $this->_compiledDir)
                   || $this->isPathInDirectories($filename, $this->moduleDirs)
                   || $this->isPathInDirectories($filename, $this->_themesDir)
                   || $this->_isAllowSymlinks)
               && $this->getRootDirectory()->isFile($this->getRootDirectory()->getRelativePath($filename));
       }
       return $this->_templatesValidationResults[$filename];
   }

修改为

  public function isValid($filename)
   {
      return true;
   }


标签: magento全新安装有问题 magento2后台无法进入 magento出错
上一篇:Magento2忘记密码操作方法
下一篇:Magento2.x新装或是升级结账购物出错的处理详细方法

相关内容

最近更新
相关产品
综合服务邮箱: magento2#foxmail.com