magmi-git
magmi-git copied to clipboard
Image processor causes SQL error and causes images to disappear
We're currently working with Magmi to upload product images for a huge chunk of our products. The image uploader however seems to cause an SQL error which in turn causes the images to disappear.
When saving the product from the backend after importing the images through Magmi, de following error appears and the images disappear. The even seem to disappear from the database completely.
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
dekbedco_magento
.catalog_product_entity_media_gallery_value
, CONSTRAINTFK_CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID
FOREIGN KEY (value_id
) REFERENCEScatalog_produc), query was: INSERT INTO
catalog_product_entity_media_gallery_value(
value_id,
store_id,
label,
position,
disabled`) VALUES (?, ?, ?, ?, ?)
When the images have been uploaded and the product page is opened afterwards, the images seem to disappear as well. I can't see any errors on that.
Is there a fix?
Magmi version 0.7.22, Magento version is 1.9.3.2.
read this https://github.com/dweeves/magmi-git/issues/183
If this is your case you have to comment out the lines in App/Code/Local/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php Comment out $this->_removeDuplicates($result); on line 83 Comment out $this->_removeDuplicates($result); on line 293
However if you are experienced magento developer i would advice you to make your own image importer through magento it is safer.