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

M2部分主机安装完成之后后台无法正常显示,变灰

作者:admin

目前测试到的版本,基本上所有版本均会有这类情况现,后台变灰。有提示

page/js/require_js.phtml' in module: '' block's name: 'require.js'

无法正常登录用户名及密码,只需要修改以下文件

vendor\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安装问题 magento安装完无法正常访问
上一篇:M2部分主机安装完成之后出现页面无法访问情况
下一篇:magento2如果快速填充演示数据到网站

相关内容

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