Closed (duplicate)
Project:
Image
Version:
6.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2006 at 04:50 UTC
Updated:
4 Apr 2006 at 07:59 UTC
image_display sending absolute urlto theme_image, which wants a relative url.
Not sure whether to report this here, or in core.
My setup is 4.7-rc1, image module and the temp hack/patch that removes 'list' from image_insert. Also my base_url is http://localhost:8888 (not sure if that is relevent or not).
So, image_display is calulating a url for the image like so:
file_create_url($node->images[$label])
which returns an absolute url.
theme_image then calculates it's url as:
check_url( base_path() . $path )
where $path is the url worked out above. Which does not work at all.
The easiest fix I found for this is to change the line in theme_image (theme.inc, line 524) to
return '<img src="'. check_url($path) .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $image_attributes . $attributes .' />';
dropping the base_path().
This seems to work fine, but I don't know if it is the best approach.
Comments
Comment #1
decafdennis commentedDuplicate of http://drupal.org/node/56364 ?