ImageCache seems to be using incorrect paths. Here's what I'm doing (using public transfer, PHP 5.2.4).
- My path is set to sites/default/files
- Create an ImageCache preset called mypreset
- Create a content type and add an ImageField to it. Do not set a custom path.
- Set the ImageField to display using one of the "mypreset" options
- Add some sample content
- View the content
When I view the content, it merely says "Article Image" where the image should be. Now here's the src of the img tag it writes:
src="http://jw.local/sites/default/files/imagecache/test/tn-IMG_0967.jpg"
Which produces no errors, but if I paste that url into my browser, I get redirected to my home page. If I insert "sites/default/files" into it, I get the correct image, like so:
http://jw.local/sites/default/files/imagecache/test/sites/default/files/tn-IMG_0967.jpg
And then the image shows up when I refresh my site's home page. This seems to be a bug in ImageCache, because using the ImageField by itself makes the image appear correctly. However, the actual file resides in sites/default/files/imagecache/test (not sites/default/files/imagecache/test/sites/default/files).
I tried swapping out various versions of ImageAPI and ImageCache (1.3 to 1.6 for API, beta 8 to DEV for Cache) and none of that works. CleanURLs and Rewriting are working, and ImageCache can create subdirectories without problem. I tried in FireFox 3.5beta and Safari 3. I have also read the troubleshooting guide as well as a few threads on drupal.org, but there's nothing obvious that I can see. I have my drupal installation on a virtual machine, so if anyone wants me to change anything, it would be a snap to revert back to pre-ImageAPI/ImageCache setup.
Comments
Comment #1
JohnWoltman commentedUpon further investigation I have found that if I go to admin/build/imagecache and flush the cache, all the images will appear next time I load the home page. I have also found that if I change imagecache.module's imagecache_create_url() function to return the correct path then it seems to work. I haven't tested it much, but here's what I changed (just one line).
Comment #2
JohnWoltman commentedFixed in beta 10.