magento 2.3安装后黑屏

时间:2018-12-06 05:27:33

标签: magento magento2 magento-2.3

Sceen Shot

安装后没有错误,管理员黑屏,但在浏览器的控制台上显示错误。

Screen Shot

3 个答案:

答案 0 :(得分:0)

请按照以下说明进行操作,希望它可以解决。 刚进入供应商/ magento /框架/视图/元素/模板/文件/validation.php 然后转到第138行

替换

  

$ realPath = $ this-> fileDriver-> getRealPath($ path);           foreach(将$ directories作为$ directory){

$path = $request->file('sample_file')->store('sample_file');

Excel::import(new DataImport, $path);

使用

  

$ realPath = $ this-> fileDriver-> getRealPath($ path);           foreach($ directories as $ directory){$ directory = $ this-> fileDriver-> getRealPath($ path);               如果(0 === strpos($ realPath,$ directory)){                   返回true;               }           }

答案 1 :(得分:0)

在我的本地主机-XAMPP Server中安装Magento 2.3.3时,我也面临相同的问题。它已成功安装,但是当我打开管理面板时,它出现了一个空白屏幕,如下图所示。 Admin Panel

解决方案是:

之后,我更改了如下代码。

转到此路径: .. \ vendor \ magento \ framework \ View \ Element \ Template \ File ,然后打开此文件 Validator.php

然后搜索此行 $ realPath = $ this-> fileDriver-> getRealPath($ path);

替换为 $ realPath = str_replace('\','/',$ this-> fileDriver-> getRealPath($ path));

Image for reference to change the Validator.php file

现在管理面板将成功显示。


出现了管理面板,但问题是Magento徽标未出现在登录屏幕上。登录管理员Admin Panel后,图标不会出现在仪表板上,并且图标也像下面的图像Icon Don't Appear

一样持续加载

解决方案是:

转到此路径: .. \ app \ etc ,然后打开此文件 di.xml

然后搜索此行 Magento \ Framework \ App \ View \ Asset \ MaterializationStrategy \ Symlink

替换行 Magento \ Framework \ App \ View \ Asset \ MaterializationStrategy \ Copy

Check this image for replacing the codeMake sure the code should come like this image

现在,转到管理面板并刷新页面。它成功运行,没有任何问题。所有图标都出现了,徽标也出现了。

Admin Panel Sucess image

现在转到客户区,如果您更新示例内容,则页面看起来像此图像Client Page with Sample Content。否则,它将显示为“ CMS主页内容在此处”。

一切正常。

我希望它将用于解决此问题。

答案 2 :(得分:0)

在 lib\internal\Magento\Framework\View\Element\Template\File\Validator.php 中

替换

$realPath = $this->fileDriver->getRealPath($path);

$realPath = str_replace("\\", "/", $this->fileDriver->getRealPath($path) );`

然后在终端中运行:

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
相关问题