Jump to content

Duplicated thumbnails on product pages


afalls
 Share

Recommended Posts

I have noticed the thumbnails of product images are all duplicated. I have only noticed this since upgrading and changing skins. I have tried reverting back to old skin but it is still occuring. 

I've search the forum but haven't found any other instance of this issue. Has anyone found a fix for this?
 

Link to example: https://mplastics.com.au/double-scissor-lift-table-350kg.html
Cubecart v 6.4.7
Skin: Basix

Link to comment
Share on other sites

Of the four images, half have a URL of /images/cache/products/ and the other half have a URL of /images/cache//products/. Note the double-slash.

This list is assigned to the template array variable $GALLERY in the core code.

I am not yet sure how to fix this. Using an external database utility (phpMyAdmin in the control panel of your hosting account, for example), look in CubeCart_filemanager. You may find rows where the values in the 'path' column have a leading slash. A leading slash is not proper.

I do not (yet) know if a folder with a leading slash will show in the admin's Add/Edit Product, Images tab file-picker.

Link to comment
Share on other sites

Thank you for your input.

I have gone through CubeCart_filemanager. There was about 50% that had the slash at the front and back of the filepath. The rest only had the end slash. Is this what you were talking about?

Screenshot_4.png

Edited by afalls
Link to comment
Share on other sites

Yes.

Perhaps the data for these products was brought in via a CSV import? (I am still tracing the code to discern where there could be a missing check for proper formatting of an image's filepath when adding images in admin's Images screens.)

If the database table is shown sorted by 'filename', are there pairs of rows for the same image?

Edited by bsmither
Link to comment
Share on other sites

Yes you are correct there are pairs of rows for the same image with and without the front slash.

In you saying CSV it has trigged a memory of me trying to use an import/export tool for bulk product updates and i am pretty sure that is how i ended up with the doubles.

I assume i should just delete all the images with the extra slash at the front in phpMyAdmin?

image.thumb.png.698f2eba976a1262e1ad759db09ef4cf.pngdelete 

Link to comment
Share on other sites

Please do that.

Also, in admin, Images, click the Update File List tab. This should remove references ('file_id' values in CubeCat_filemanager) to these now deleted rows from the CubeCart_image_index table (I hope).

 

Link to comment
Share on other sites

This didn't exactly work. It removed both versions of the thumbnail images. I did however find a work around by editing the csv file to remove those extra instances of images and it's all fixed now.

 

Thanks for all your help!

Link to comment
Share on other sites

It was a bit strange as i tried deleting the product without the extra slash in front and there was then only one instance of the thumbnail but you could not longer edit/remove the image through the admin interface. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...