When inserting images into a node using imce and tinymce, the path to the image is given as an absolute path, rather than a relative one.
Situation: creating content on my home machine before transferring to the server and going live.
Drupal is accessed on my home machine via http://localhost/drupal-5.0 , "drupal-5.0" being the subdirectory in which Drupal is installed.
When IMCE generates links to files for insertion into nodes, the links look like this: "/drupal-5.0/files/whatever.jpg".
Links should look like this: "files/whatever.jpg", which is relative to the drupal installation.
This is a small bug which will wreak havock when migrating Drupal installations.
BTW, IMCE is a great module. Thank you for all the hard work!!!!!
Comments
Comment #1
ufku CreditAttribution: ufku commentedthe URLs created by IMCE are drupal URLs and they are relative to the host name. they must be so, because when you use clean URLs relative paths in a page may corrupt.
for instance in a "/node/x" page, your path "files/whatever.jpg" will point to "/node/files/whatever.jpg" which is incorrect.
this is a common situation with development sites under a sub-directory. if you search the site you'll see that there is already lots of discussions on this. i think the best practice is to work under a sub-domain (sub.domain.com) pointing to your test site.
i hope it helps.