Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image processor causes SQL error and causes images to disappear #557

Open
JerVoo opened this issue Oct 24, 2017 · 1 comment
Open

Image processor causes SQL error and causes images to disappear #557

JerVoo opened this issue Oct 24, 2017 · 1 comment

Comments

@JerVoo
Copy link

JerVoo commented Oct 24, 2017

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, CONSTRAINT FK_CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID FOREIGN KEY (value_id) REFERENCES catalog_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.

@paradoxos
Copy link

read this
#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants