uploads/Products/ changes to uploads/_products/

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
montedavis
Forum Members
Forum Members
Posts: 64
Joined: Wed Jul 03, 2013 7:44 pm

uploads/Products/ changes to uploads/_products/

Post by montedavis »

I recently upgraded from a 1.12.2 to a 2.15.x cmsms. I've run into some issues with the Products module. For some reason the snippet of code below is redefined in my 2.15.x cmsms

<img src="{$entry->file_location}/{$field->thumbnail}" alt="{$field->value}"/>

in 1.12.2 the parsed path is /uploads/Products/product_10/

in 2.15.x the parsed path is /uploads/_products/product_10/

my images will not display for the /uploads/_products/product_10/ url.

Any suggestions?

Thank you,

Monte
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: uploads/Products/ changes to uploads/_products/

Post by DIGI3 »

At some point the dev switched this to use the new path for the uploads, presumably so users with File Manager access wouldn't delete product images (directories starting with an underscore are hidden from File Manager). I haven't read through all of the release notes to confirm, but that would be my guess.

I think the easiest solution would be to move the images in your file system. New products should upload them to the correct (new) place. A more complicated option would be to test for the existence of the file in the new place and, if not found, check in the old location. You can use the php function file_exists if you allow permissive Smarty in your config.
Not getting the answer you need? CMSMS support options
montedavis
Forum Members
Forum Members
Posts: 64
Joined: Wed Jul 03, 2013 7:44 pm

Re: uploads/Products/ changes to uploads/_products/

Post by montedavis »

Thank you! I was thinking about renaming "Products" folder to "_products" similar to what you suggest, thank for the background info.
Post Reply

Return to “Modules/Add-Ons”