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

sandrewj’s picture

Status: Active » Closed (fixed)

Are 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.

wojtha’s picture

Assigned: rcahana » Unassigned
Status: Closed (fixed) » Active

Same here, after upgrade to Beta12 some of the thumbnails stop working.

sandrewj’s picture

Status: Active » Postponed (maintainer needs more info)

Does %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?

rcahana’s picture

Yea imagecache was adding that %252F into my links.
Afrer downgrading to Beta10 the problem was solved..

wojtha’s picture

@sandrewj yeah. I resolved that by removing leading "/" in my custom code

sandrewj’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

%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.