Я хочу добавить новый продукт в мой новый интернет-магазин 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));
},