Magento 2.3.3问题:在产品页面上上传图像时出错



我想在我的新Magento 2.3.3网上商店中添加一个新产品。当我在此页面上上传产品图片时,我看到以下内容:

https://i.stack.imgur.com/RUoPM.png

我看起来它会上传另一张图片,但我只选择了 1 张。

接下来,我将保存产品,但这是不可能的(我按下按钮,但没有任何反应(

当我从浏览器查看控制台时,出现以下错误:

product-gallery.js:138 Uncaught TypeError: Cannot read property 'value' of undefined
at product-gallery.js:138
at Function.grep (jquery.js:471)
at $.<computed>.<computed>.setBase (product-gallery.js:133)
at $.<computed>.<computed>.setBase (jquery-ui-1.9.2.js:432)
at $.<computed>.<computed>._addItem (product-gallery.js:217)
at $.<computed>.<computed>._addItem (jquery-ui-1.9.2.js:432)
at HTMLDivElement.handlerProxy (jquery-ui-1.9.2.js:739)
at HTMLDivElement.dispatch (jquery.js:5232)
at HTMLDivElement.elemData.handle (jquery.js:4884)
at Object.trigger (jquery.js:5136)

这是产品库中的第 138 行.js

setBase: function (imageData) {
var baseImage = this.options.types.image,
sameImages = $.grep(
$.map(this.options.types, function (el) {
return el;
}),
function (el) {
return el.value === baseImage.value; #LINE 138
}
),
isImageOpened = this.findElement(imageData).hasClass('active');
$.each(sameImages, $.proxy(function (index, image) {
this.element.trigger('setImageType', {
type: image.code,
imageData: imageData
});
if (isImageOpened) {
this.element.find('.item').addClass('selected');
this.element.find('[data-role=type-selector]').prop({
'checked': true
});
}
}, this));
},

您是否正在使用任何自定义模块? 无论如何 尝试重新部署静态内容。 通过SSH连接服务器和goto magento根目录。运行以下命令(我更喜欢这种方式。

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean

我也遇到了同样的问题,请检查您的属性代码(基本,色板,缩略图,小(是否存在图像。就我而言,这些属性被删除了。

最新更新