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 community@magento.com.

Magento Forum

Images all blank after Magento Upgrade
 
sean_dunwoody
Jr. Member
 
Total Posts:  15
Joined:  2012-09-06
 

I\’ve upgraded a store from 1.4.0.1 to 1.7.0.2 and I think I\’m nearly there (although it\’s taken a while!) however I am now facing a problem with images all showing as blank.

It\’s not that the images are missing or not allocated - it\’s that they aren\’t set as the default for the image, so they don\’t show on any listing pages (I hope I\’m making sense here)

See this image to see what I am trying to describe

I didn\’t copy over the media directory whilst upgrading Magento and have only now done so ... I\’m not sure if this could have effected it?

Obviously I could go through and change every products default image, but this would be really time consuming (there are currently over 6000 products) so I\’m wondering if there\’s an easier way to do this?

I\’m looking at the database now to try and figure out if there\’s some SQL I can run - but there\’s so many tables I\’m not 100% sure where to start (and I really don\’t want to break anything else)

 
Magento Community Magento Community
Magento Community
Magento Community
 
edmondscommerce
Guru
 
Avatar
Total Posts:  342
Joined:  2008-08-26
 

In the picture the image is being saved as a gallery img, which means it is possible to pull the value out of the database and set it as the base image.

The path to the image should be stored in the catalog_product_entity_media_gallery table and can be linked to a product based on the entity_id.

Using the values from that you can update the catalog_product_entity_varchar table with the same value for the base, small and thumbnail if required.

Before you do this, you will need to find out the attribute id for the different images attributes. This can be done by looking for the following attribute codes image, small_image, thumbnail

Once you have these you can check the data base and see if the attributes have been set with a blank or null value, or if they are missing.

If they are set in the database you can run an update using the values from the media_gallery table, otherwise you will have to pull the values out and then use then to create an insert.

As always when playing with the magento database, take a backup before you do anything and never run the script against the live site until you are confident it will work!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sean_dunwoody
Jr. Member
 
Total Posts:  15
Joined:  2012-09-06
 

Thanks edmondscommerce, just what I needed to get this finished smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top