When referencing an image in a page, the render of the page is automatically putting /node/ into the link when displaying the page, making the references invalid.

For example: An image inserted with this (full html)

<img src="assets/images/image.gif" />

Is displayed with the link to picture looking like

http://www.mysite.com/node/assets/images/image.gif

Of course, to sidestep the problem, I made a folder called node and dumped the assets into it, but I was wondering if there is a way to avoid having to do this and make the page display correctly without having to 'trick' drupal.

Comments

Bluetiereign’s picture

When referencing a PDF in iframes - I get the same thing as this error is producing.

<iframe width="100%" height="600" title="My PDF" src="assets/pdf/my.pdf"></iframe>

produces this error in watchdog:

taxonomy/term/assets/pdf/my.pdf not found.

Does ANYONE have a clue as to what is going on ? Do I have a bad install ?

stevenpatz’s picture

have you tried putting a / in front of asests?

<img src="/assets/images/image.gif" />
Bluetiereign’s picture

I've done that and drupal is automatically removing it in save. If I put the full path http://mysite.com/assets/my.pdf, drupal removes the http://mysite.com/ and adds WHATEVER it feels like adding..

This is getting very annoying, because it is doing it with pictures in posts, references to documents in posts and my attachments - images and files. I don't understand why drupal is doing this. The older version I had worked great.

I

Bluetiereign’s picture

apparently this is a 'problem' created by the way that drupal handles links. using the Pathfilter module solved the problem.

thanks for the path hint. when added to the search - found the issue.