Closed (fixed)
Project:
ImageCache
Version:
5.x-2.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2008 at 03:34 UTC
Updated:
20 Jan 2009 at 03:20 UTC
I am using the theme() function to render my image. However,
print theme('imagecache', 'presetName', 'files/foo/imageName.jpg')
outputs
http://www.myserver.com/files/imagecache/presetName/foo/imageName.jpg
The "files" that I think is supposed to go between presetName and foo is no longer there. So, the image doesn't render, since it hasn't yet been created. (If I manually go to http://www.myserver.com/files/imagecache/presetName/files/foo/imageName.jpg first, then the image gets created and the image tag generated by the theme function does correctly display the image.)
Am I doing something incorrectly?
Comments
Comment #1
dopry commentedthat is the output it should produce. I changed the url output to be shorter according to popular demande....
Try updating the display settings for you content types, and let me know if thta helps.. There was an error in the update path with the formatters.... The machine readable names changed, but they didn't get updated in the DB. It was an oversight on my behalf.
Comment #2
weeone commentedI updated the display settings for the content type (/admin/content/types/mytype/display, right?) but that didn't do anything.
In my theme file, node-mytype.tpl.php, I use the function:
But the image does not display, because the image doesn't get created in the folder. Am I using the wrong function to display the image? Or perhaps using the function incorrectly?
(As I said in the original post, though, if I manually go to http://www.myserver.com/files/imagecache/presetName/files/foo/imageName.jpg, the image does get created. Then the theme function above works.)
(Sorry if this doesn't provide any additional info.)
Comment #3
drewish commentedupdate to the latest version. if that didn't fix it re-open this issue.