It appears that drupal's handling of clean url's has changed.

On the page "http://www.drupal.org/node/123" within which an image is embedded with "Only local images are allowed.", previously drupal would display the images at:

http://www.drupal.org/images/1.jpg (correct)

Since 4.7, the image displayed would instead be:

http://www.drupal.org/node/images/1.jpg (wrong)

While this is not a problem going forward, because if the image tags read Only local images are allowed. the correct location will be accessed, but for existing databases all images will not load.

There appears to be a partial workaround: by disabling clean urls, the node page would be http://www.drupal.org/index.php?1=node/123, and so the correct image will load. However, if the URL http://www.drupal.org/node/123 is used instead (which is possible because of links from elsewhere, etc) the images will still all be broken.

Comments

killes@www.drop.org’s picture

Project: Drupal core » Image
Version: 4.7.1 » 4.7.x-1.x-dev
Component: update system » image.module
Priority: Critical » Normal

image should do its own update for this.

xand’s picture

sorry - i don't mean image as in image module:

I meant images as in images within drupal posts.

for example:

<img src="images/1.jpg">
xand’s picture

Title: 4.7 uses new rules to determine relative paths, but update does not change database entirely » I suppose I might as well close this.
Project: Image » Drupal core
Version: 4.7.x-1.x-dev » 4.7.0
Component: image.module » update system
Status: Active » Closed (works as designed)

After further searches, I realise that this has been covered before:

http://drupal.org/node/58106

http://drupal.org/node/58446

Horrible, but apparently here to stay.

killes@www.drop.org’s picture

Project: Drupal core » Image
Version: 4.7.0 » 4.7.x-1.x-dev
Component: update system » image.module
Status: Closed (works as designed) » Active

image module still shoudl rewrite its own links during updates...

killes@www.drop.org’s picture

Title: I suppose I might as well close this. » Image module needs to rewrite embedded image links on update

see Drupal update system_update_178 for a template.

sun’s picture

Status: Active » Closed (won't fix)

Development and support for 4.7.x and 4.6.x has ended. You are strongly advised to upgrade to Drupal 5.x or 6.x.

Marking as won't fix. Feel free to re-open this issue if it still exists in one of the supported releases.