奇葩知识:M2静态生成时报Warning: file_put_contents(generated/metadata/primary|global|plugin-list.php): failed

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

03202211_01.jpg错误产生过程:

在编译时出现

F:\wwwroot\www.test4.com>F:\BtSoft\php\74\php.exe bin/magento setup:di:compile
Compilation was started.
Plugin list generation... 8/9 [========================>---]  88% 1 min 326.0 MiB
In ErrorHandler.php line 61:

  Warning: file_put_contents(F:/wwwroot/www.test4.com/generated/metadata/primary|global|plugin-list.php): failed to o
  pen stream: No such file or directory in F:\wwwroot\www.test4.com\vendor\magento\framework\Interception\PluginListG
  enerator.php on line 414


setup:di:compile

解决方法:

1. 打开文件

\vendor\magento\framework\Interception\PluginListGenerator.php

2.找到以下代码

$cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;

替换为

$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;

再次编译

03202211_02.jpg

已经正常。

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

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

立即登录

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

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

奇葩知识:M2静态生成时报Warning: file_put_contents(generated/metadata/primary|global|plugin-list.php): failed 来源于 https://www.magentola.com/news-read-272.html
上一篇:M2如何手动验证用户邮箱地址,变更Confirmation Required状态
下一篇:M2前台所有产品价格突然变更为0
相关内容
产品推荐