Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.
For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email email@example.com.
Okay so I edited some of the store’s products using the Export tool on Magento to edit some of our products information, I uploaded the edited CSV and then I got an Index Management Issue which is now resolved but my all my images are missing and it doesn’t even have the option now to upload images either
Okay so I ran the query in phpmyadmin for the corresponding MySQL database and got the following
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'catalog_product\' INNER JOIN eav_attribute va ON va.entity_ty
This problem will happen with both new and updated products, when new image names are added with CSV.
There is an SQL statement that will fill the missing records, and which you will need to run each time after importing products with images using CSV:
INSERT INTO catalog_product_entity_media_gallery (attribute_id, entity_id, `value`) SELECT ga.attribute_id, v.entity_id, v.value FROM catalog_product_entity_varchar v INNER JOIN eav_entity_type et ON et.entity_type_code=\'catalog_product\' INNER JOIN eav_attribute va ON va.entity_type_id=et.entity_type_id AND va.frontend_input=\'media_image\' AND va.attribute_id=v.attribute_id INNER JOIN eav_attribute ga ON va.entity_type_id=et.entity_type_id AND ga.attribute_code=\'media_gallery\' LEFT JOIN catalog_product_entity_media_gallery g ON g.entity_id=v.entity_id AND g.value=v.value WHERE v.value<>\'no_selection\' AND v.value<>\'\' AND g.value IS NULL;