2010-06-24, 01:14:31
I think the problem might be with the relative path starting with two dots. Think about this example:
A way to fix this would be to start your relative paths with just a forward slash (/), this will set the browser to start at the root. /data/uploads/image.png always points to http://example.ms/data/uploads/image.png.
Relative paths are always tricky. A path that works in the admin section is made to work relative to the admin section only, not to the final page.
- I create a child page called child to a page called parent.
Now the address for this page will be: http://example.ms/parent/child.
- On this page I embed an image with a path that worked in the admin: ../data/uploads/image.png.
- Now I open the page in my browser.
The browser will try to get the following image: http://example.ms/parent/data/uploads/image.png.
- The image does not exist.
A way to fix this would be to start your relative paths with just a forward slash (/), this will set the browser to start at the root. /data/uploads/image.png always points to http://example.ms/data/uploads/image.png.
Relative paths are always tricky. A path that works in the admin section is made to work relative to the admin section only, not to the final page.
“Don’t forget the important ˚ (not °) on the a,†says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!