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

Magento2 Magento 2.3.3问题:在产品页面上载图像时出错,magento2,magento2.3.3,Magento2,Magento2.3.3,我想在新的Magento 2.3.3网店中添加新产品。当我在此页面上载产品图像时,我看到: 我看起来它会上传其他图像,但我只选择了1 下一步,我将保存产品,但这是不可能的(我按下按钮,但什么也没有发生) 从浏览器查看控制台时,出现以下错误: product-gallery.js:138 Uncaught TypeError: Cannot read property 'value' of undefined at product-gallery.js:138 at Function.grep

我想在新的Magento 2.3.3网店中添加新产品。当我在此页面上载产品图像时,我看到:

我看起来它会上传其他图像,但我只选择了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)

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


谢谢你的回复。我照你说的做了,但我也有同样的问题。这是一个新安装,我添加了来自Meigee的通用主题…我在问题中添加了product-gallery.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));
    },
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