开发者

Images uploading, going to the /media/tmp, but not saving in media/catalog after saving product [Magento]

As the title says, I’m having trouble saving the images for the products.

I edit a product (grouped product), go on images tab, upload an image (this wokrs fine, the image is there when I rollover and I can see its URL on the /tmp folder), choose the store views for it and proceed to save the product.

Check the frontend, no image. Check/edit the product again, no image there aswell. It just vanishes (although it stays in the /tmp folder).

Could you help me sort this out? I've set all permissions to 777 temporarily and still no luck.

Fixed: http://www.magentoc开发者_如何学Commerce.com/boards/viewthread/4348/P45/#t327010


Fixed it!!! I experienced this issue after migrating from M1 to M2. When edit any product, add/delete image does not work. It shows when it is uploaded but after save it does not save. I have applied this query to solved the issue. here media_gallery attribute id is 703.

DELETE FROM catalog_product_entity_varchar WHERE attribute_id = 703 and value = 0

DELETE FROM catalog_product_entity_varchar WHERE attribute_id = 703 and value = NULL


If anyone is still facing the same problem, it may be because of the prototype.js version.

Change the xxx.toJSON() calls in js/mage/adminhtml/product.js to Object.toJSON(xxx). For example from this:

$(this.idPrefix + 'save_attributes').value = this.attributes.toJSON();

to this:

$(this.idPrefix + 'save_attributes').value = Object.toJSON(this.attributes);


I had similar issue when I migrated from M1 to M2.
After debugging I found that in eav_attribute db table originally the backend_type for attribute media_gallery in M2 is set to static but after migration it got replaced by varchar.
I have changed it back to static and form me image upload and save started to work for products.
Hope this will help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜