1

清除缓存,对maganto目录中的所有文件和文件夹赋予777权限,仍然没有解决方案..

我什至无法访问管理面板,因为链接无法正常工作。

这是全新安装,我做到了

git clone magento_https_link

其中 link 是 magento2 @ github 的 github 链接。

一切顺利,我按照官方教程,安装了 composer thing 和所有,我安装了它,按照步骤到最后,安装完成后,我点击了前端,没有 css,和后端,没有 css。Css 在安装过程中运行良好。

当我按 F12 并切换到控制台时,它在 css 、 javascript 和图像文件上显示错误 404。如果我尝试手动访问任何 css 的 url,它们都不存在。它真的很奇怪。

而且我不知道什么是 css js 合并。对此没有任何想法。

我在数据库中的核心配置:

mysql> select * from `core_config_data`;
+-----------+---------+----------+-------------------------------+------------------------------------------+
| config_id | scope   | scope_id | path                          | value                                    |
+-----------+---------+----------+-------------------------------+------------------------------------------+
|         1 | default |        0 | web/seo/use_rewrites          | 1                                        |
|         2 | default |        0 | web/unsecure/base_url         | http://NAME_OF_SITE/magento/magento2/  |
|         3 | default |        0 | web/secure/base_url           | https://NAME_OF_SITE/magento/magento2/ |
|         4 | default |        0 | general/locale/code           | en_US                                    |
|         5 | default |        0 | web/secure/use_in_frontend    | NULL                                     |
|         6 | default |        0 | web/secure/use_in_adminhtml   | NULL                                     |
|         7 | default |        0 | general/locale/timezone       | XX/XX                             |
|         8 | default |        0 | currency/options/base         | XX                                      |
|         9 | default |        0 | currency/options/default      | XX                                      |
|        10 | default |        0 | currency/options/allow        | XX                                      |
|        11 | default |        0 | general/region/display_all    | 1                                        |
|        12 | default |        0 | general/region/state_required | AT,BR,CA,CH,DE,EE,ES,FI,FR,LT,LV,RO,US   |
|        13 | default |        0 | catalog/category/root_id      | NULL                                     |
+-----------+---------+----------+-------------------------------+------------------------------------------+
13 rows in set (0.00 sec)
4

4 回答 4

3

您是否使用 bin/magento 安装程序执行了所有需要的步骤?

听起来您应该尝试这样做(在您的根 magento 类别中):

bin/magento setup:static-content:deploy

请让我知道这可不可以帮你。

于 2015-10-23T15:18:00.857 回答
1

Magento2 有这个初始问题,但请按照以下步骤进行操作!

第 1 步:运行 CMD
第 2 步:使用转到 Magento 安装目录

CD wamp/www/[Magento 目录]

第 3 步:运行

php bin/magento 设置:静态内容:部署


第 4 步:运行

php bin/magento 索引器:重新索引


第 5 步:删除缓存

var/cache/[删除所有目录]


它正在为前端和后端工作!

http://developerforums.blogspot.com/

于 2016-04-06T10:07:46.630 回答
0

只需MAGENTO_ROOT/app/etc/di.xml从第 574 行打开并替换以下代码

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>
于 2016-01-31T09:52:16.447 回答