afalls Posted September 13, 2022 Share Posted September 13, 2022 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 13, 2022 Share Posted September 13, 2022 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. Quote Link to comment Share on other sites More sharing options...
afalls Posted September 14, 2022 Author Share Posted September 14, 2022 (edited) 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? Edited September 14, 2022 by afalls Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 14, 2022 Share Posted September 14, 2022 (edited) 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 September 14, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
afalls Posted September 17, 2022 Author Share Posted September 17, 2022 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? delete Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 17, 2022 Share Posted September 17, 2022 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). Quote Link to comment Share on other sites More sharing options...
afalls Posted September 21, 2022 Author Share Posted September 21, 2022 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! Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 21, 2022 Share Posted September 21, 2022 "It removed both versions of the thumbnail images." Hmm! I will want to investigate this. Quote Link to comment Share on other sites More sharing options...
afalls Posted September 21, 2022 Author Share Posted September 21, 2022 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.