当我想将任何产品(简单)添加到我的购物车时,按钮会显示一条成功消息,但是从我得到的主要消息中:"We can't add this item to your shopping cart right now".我选择哪种产品并不重要,而且我还尝试了隐身模式或缓存刷新后重新加载。
我正在运行新安装的 Magento 2.3.0 版本,并且处于开发人员模式。
从日志中我得到以下信息:
main.CRITICAL: Notice: tempnam(): file created in the system's temporary directory in /www/htdocs/[...]/[...]/vendor/magento/zendframework1/library/Zend/Cache/Backend.php on line 203 {"exception":"[object] (Exception(code: 0): Notice: tempnam(): file created in the system's temporary directory in /www/htdocs/[...]/[...]/vendor/magento/zendframework1/library/Zend/Cache/Backend.php on line 203 at /www/htdocs/[...]/[...]/vendor/magento/framework/App/ErrorHandler.php:61)"} []
从 Backend.php 的第 203 行开始:
$tempFile = tempnam(md5(uniqid(rand(), TRUE)), '');
if ($tempFile) {
$dir = realpath(dirname($tempFile));
unlink($tempFile);
if ($this->_isGoodTmpDir($dir)) {
return $dir;
}
}
Run Code Online (Sandbox Code Playgroud)
由于产品有库存,我希望它们能够正确添加到购物车中。