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

作者:admi... 点击数: 0 收藏到会员中心
最后编辑时间: 2022-05-24 12:01

 出现这种情况的基本上是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;
   }


请登录已经激活账号继续浏此文章所有内容!
会员中心

已经有帐号啦 !赶紧同小伙伴们愉快地玩耍吧

立即登录

还没有账号? 马上注册一个新帐户

注册账号
内容说明:
如您需要转载本文请保留以下信息是对作者发文的支持与尊重:

Magento2新安装的后台变灰,无法登录及正常使用 来源于 https://www.magentola.com/news-read-24.html
上一篇:Magento2忘记密码操作方法
下一篇:Magento2.x新装或是升级结账购物出错的处理详细方法
相关内容
产品推荐