Closed (fixed)
Project:
ImageCache
Version:
6.x-2.0-beta12
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2011 at 00:49 UTC
Updated:
15 Aug 2011 at 14:55 UTC
i used this code
print theme('imagecache', 'product-main-image', base_path() . $imagePath , $alt, $title);
base_path() and $imagePath were set correctly,
i found out that imagecache was adding the text %252F into my path, so the path to the image was
sites/default/files/imagecache/product-main-image/%252Fsites/....
That was the reason the image didn't load.
After downgrading the Beta10 my site was showing the images correctly.
Comments
Comment #1
sandrewj commentedAre you sending a leading slash in your path?
/sites/default/files/myimage.jpg
try instead
site/default/files/myimage.jpg
you are getting
sites/default/files/imagecache/product-main-image//sites/default/files/myimage.jpg
with the second consecutive slash double encoded by drupal
you should be getting
sites/default/files/imagecache/product-main-image/files/myimage.jpg
It should remove the "sites/default/" portion in the output.
Comment #2
wojtha commentedSame here, after upgrade to Beta12 some of the thumbnails stop working.
Comment #3
sandrewj commentedDoes %252F also show up in the paths to your thumbnails?
Are you also manually calling the theme imagecache function, or is a module generating the imagecache links?
Comment #4
rcahana commentedYea imagecache was adding that %252F into my links.
Afrer downgrading to Beta10 the problem was solved..
Comment #5
wojtha commented@sandrewj yeah. I resolved that by removing leading "/" in my custom code
Comment #6
sandrewj commented%252F appearing in imagecache paths is a result of sending a leading / to the theme function. (More generally it will occur anytime // appears in a path drupal is encoding)
If you are using custom code, please remove the leading / in your image path.