This is a separate thread I'm opening from the discussion at http://drupal.org/node/583508 - insofar as the bug is very specific (and the other thread may involve different issues) I thought it would be easier to keep track of it that way.
Summary: When running in a subdirectory, subdirectory path for the site is incorrectly prepended to the proper attached image path. Thus, images fail to display.
Example:
Dev site base URL is "http://xxx.xx.xx.xx:8888/" - working directory in this case would be "http://xxx.xx.xx.xx:8888/[sitename]".
Correct path for attached thumbnail image should be:
"http://xx.xxx.xx.xx:8888/[sitename]/sites/default/files/images/[image].t..."
Instead, generated path is:
"/[sitename]/http://xx.xxx.xx.xx:8888/[sitename]/sites/default/files/images/[image].t..."
Obviously, this is really wrong. This only seems to happen when the site is running in a subdirectory; on a production site that's installed relative to the base URL, the problem doesn't appear to arise, which has made tracking this down (obvious as it is) even more of a head-scratcher.
Changes to the .htaccess file, clearing caches, theme registry, etc. have no effect.
Hope this helps!
Comments
Comment #1
joachim commentedAnd it's ONLY for attached images, not the image nodes?
Check the call to image_display() in image attach module.
Comment #2
bcobin commentedAHA!
Just checking quickly and going to the image nodes, the image nodes themselves are, indeed, malformed, and thus, do not appear.
Likewise, simply creating an Image node also doesn't work.
So this looks like something related to Image itself, not to Image Attach per se.
I'll try to do some more in-depth research if I have time soon (not likely); for now, suffice it to say that the latest version of Image needs further testing when deployed in a typical sandbox (subdirectory) environment.
Wish I could be of more help right now - thanks for looking into this, Joachim!
Comment #3
joachim commentedAll my local test sites are in subdirectories (on a MAMP install) and the images work fine.
"/[sitename]/http://xx.xxx.xx.xx:8888/[sitename]/sites/default/files/images/[image].t..."
Looking at that, my wild guess would be that the filepath is getting sent through url() to get the http and the domain, and then sent through something that tried to build a path.
Have you got theme overrides? It's possible the data that's passed to these was changed.
Comment #4
bcobin commentedMy bad - this looks like an issue with CDN integration; I've filed an issue here.
Sorry for taking up your time on this, Joachim - trying to do too many things at once; always a bad idea!
Closing the issue... thanks for all the work you're doing!