CMS MADE SIMPLE FORGE

SmartImage

 

[#12472] File not found issue

avatar
Created By: Darren Kierman (kierweb)
Date Submitted: Mon Sep 06 04:56:21 -0400 2021

Assigned To: Fernando Morgado (JoMorg)
Version: 1.0
CMSMS Version: 2.1.5
Severity: Major
Resolution: None
State: Open
Summary:
File not found issue
Detailed Description:
For some reason on some pages (on this occasion my homepage), the script isn't
finding any images (even though it's there) and it worked fine on CGSmartImage.

I'm suspecting it's something to do with the cache coding on the module - but
not sure.

"Notice: Could not find a file at: /uploads/images/_products/1/cumbria-box.jpg
in /home/***/public_html/modules/SmartImage/action.default.php on line 44"


History

Comments
avatar
Date: 2021-09-06 05:05
Posted By: Darren Kierman (kierweb)

Did a bit more investigation on this ... and it appears to be something in
regards to the coding labelled "determine if its is uploads" ...

I removed the "uploads/" bit of my src and it's now displaying my images.

      
avatar
Date: 2021-10-14 05:46
Posted By: Franck (knarf)

Confirmed. And workaround by removing the uploads/ bit works.
      
avatar
Date: 2021-10-18 12:26
Posted By: Ludger Merkens (lume)

Because I work with a historically grown dataset I normalise my image filenames
with a udt that also checks against php's is_file(), thus I'm sure my files
actually exist.

Files directly unter /uploads/images/image_that_exists.jpg seem to be fine with
SmartImage,
Files in a subdirectory like /uploads/images/subdir/image_that_exists.jpg seem
to trigger the problem.

happy hunting
      
avatar
Date: 2022-01-06 07:57
Posted By: Ruud van der Velden (ruudvdvelden)

modules\SmartImage\lib\class.si_utils.php  line 658
replace 'trim' with 'rtrim'

The pad isn't valid when stripping the leading (left) / which makes realpath()
return false.
      
Updates

Updated: 2021-09-06 05:05
resolution_id: => 5