cancel
Showing results for 
Search instead for 
Did you mean: 

Gallery filenames breaks database

Gallery filenames breaks database

Hi guys, im trying to update my database to use all lowercase characters for any value name path for images.

 

If i happen to run this via a simple SQL code, when i go back into magento admin and edit a product, ALL of the image options (Base/Small/Thumb) are NOT selected....any ideas, why changing the case of the image path would do this? And how can i get around it?

 

Many thanks,

5 REPLIES 5

Re: Gallery filenames breaks database

Have you also renamed your images that in the media folder ? 

Re: Gallery filenames breaks database

yes, they were all made lowercase to reflect the database entries

Re: Gallery filenames breaks database

Have you also update the media attributes "image", "small_image", "thumbnail" in the table "catalog_product_entity_varchar" ?

 

The base image, small image, thumbnail image information is stored in this table.

Maxime Coudreuse, developer of Product Manager for Magento: User-friendly product editor with customizable grid interface and category tree for Magento 1 and 2

Re: Gallery filenames breaks database

Ive not, but ive just looked into that table, and cant find a reference of base image/small image/thumbnail.....

Re: Gallery filenames breaks database

Look for the attribute codes image, small_image, thumbnail in the table eav_attribute. Get the attribute_id values.

 

In my Magento installation, 

image has attribute_id 85

small_image has attribute_id 86

thumbnail has attribute_id 87

 

In catalog_product_entity_varchar table, the image values have the attribute ids found in eav_attribute.

Maxime Coudreuse, developer of Product Manager for Magento: User-friendly product editor with customizable grid interface and category tree for Magento 1 and 2