I have been having a problem with some template variables and the Friendly Alias Path setting,
All my images paths are coming though as relative links (/images/pic1.jpg) which is breaking my images, I checked online and found that the Friendly Alias Path is what sets the images to appear as relative links, but my setting is off, and I cannot get the first slash to remove.
Currently running version 2.0.5-pl, could this be a bug not being able to disable relative paths?
Thanks
I have updated to the latest 2.0.6 pl and the problem sorted itself out after a short while of clearing sessions ect.
I’m having the opposite problem, with 2.0.6-pl. I’m using Friendly Alias Paths (which is what I want) and my images are being output without a leading slash - and therefore not loading. Any idea what’s up?
They shouldn’t be loading with one, since they should be relative...do you have a <base href="[[++site_url]]" /> tag in your HEAD of your Template?
Also, what are your filemanager_path and filemanager_url settings?
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
Yeah - <base href="[[++site_url]]" /> fixed it, thanks!
-
☆ A M B ☆
- 2,475 Posts
Old post, but this issue continues. Using the base tag is a bad solution: the base tag can break Apache caching modules and it can make named anchors problematic. If your link scheme is set to absolute, then TinyMCE (or anything else) should respect that, i.e. it should ABSOLUTELY be loading with leading slash.
There are a couple things that you can adjust to make this work. In your System Settings, you can update your tiny.path_options setting to be "fullpathurl" and the entire path will be printed -- this isn't so great if you change domains or migrate from dev to prod because the current server's site_url will be included in your img src. A better option in most cases is "rootrelative" -- that will ensure that a leading slash is used.
[ed. note: Everettg_99 last edited this post 13 years ago.]