2

I am in the process of importing a bunch of configurable and simple products.

All was good until, the last few products.

After importing the csv file for the product images, and visiting the product in admin the image is imported correctly. However I have the re-index message obviously.

After running the re-index however all of the images for that product are gone.

I went into the database to try and see what was going on. I found the images still listed in the table 'catalog_product_entity_varchar'

So I deleted all the rows with the image that I was importing. Then I went to import the image again. And same problem. The image shows up until I run the re-index.

What can I do?

I just checked a bunch of the other simple products that I had made and ensured the images were there. But now they seem to not be there either in the admin. However on the front end of the site the images load when they are selected. So it appears the issues is really that the product images are not being shown in admin but do in fact exist, and are being properly associated with the product.

So why arent they showing in admin?

1

I ran into this issue before, take a look at this SCRIPT, simply create a one column csv, and run the script. Make sure to make full backup before, just in case.

  • Thanks I just came across this. And then I realized I already did this when I first started importing! I just forgot about it. So i tried it again and the pics show up in admin woohoo. but then I ran the re-index again (even though there was no message) and the images are gone again! whyyy – Sackling Jun 2 '15 at 19:08
  • 1
    Another update. I found out what is causing the issue. I am importing 33 simple product SKUs, all of which are the same image. they are the same product with different sizes, so it makes sense that they should all use the same image. When doing the re-index for some reason magento would erase any duplicate rows where the value for _media_image was identical. So it leaves just one out of the 33 SKUs with an image. that column only affects the admin display though. This is a problem because if I edit the product in admin and click save, it will actually delete the image from the front too – Sackling Jun 2 '15 at 20:00
  • You can't share one image between multiple products. This is how it works. When the import is initializated you can pass 3rd parameter $move to the function addImageToMediaGallery as false, but Magento will then copy the image to path created by the name of the product so you will have 33 copies of the same image for each product. If Image with same name already exists it will append suffx _1 where 1 is increment number. – versedi Jun 3 '16 at 5:41
1

We noticed a very similar behavior using CE 1.9.2.4, but only if "Update on Save" was set for re-indexing. If re-indexing is set to "Manual," and we re-index after updating anything on one or more products (descriptions, etc.) we do not lose the assigned images, both for configurables and simple products. We imported them using Magmi, and, at first, thought the issue was somehow with Magmi. But, it appears to be how Magento handles automatic re-indexing whenever product information is updated.

Therefore, our process is to import via Magmi and manually re-index. We have no problem sharing the same image among products this way, and the images are not renamed for each simple product.

That said, we are investigating using Magmi's image renaming functionality to give each image a unique name when imported for each product.

0

It happened to me that after reindexing, all the products disappear in frontend. It turned out that the attribute sku was to set 0 in the table catalog_eav_attribute. To check what are the attributes that are off, use the following sql:

SELECT c.attribute_id, used_in_product_listing, attribute_code
FROM `catalog_eav_attribute` c
JOIN eav_attribute e
ON e.attribute_id = c.attribute_id
WHERE used_in_product_listing = 0

So, if you see the small_image attribute is turned off, you can set it to 1 in the table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.