TinyMCE converts relative links incorrectly (adds wp-admin)
|Reported by:||Otto42||Owned by:||azaozz|
TinyMCE has a feature that auto-converts relative links to absolute ones. This is a good thing for WordPress, since anybody using non-default permalinks needs this feature for their links to work.
The problem is that TinyMCE in 2.5 is converting all the relative links as if they are in the wp-admin path. This is breaking image insertion as well, for some people.
The root cause is the lack of a defined "document_base_url" setting. When TinyMCE cannot find one, it uses the current url of the page it's in, which happens to be the write page in wp-admin.
Possible, but untested, fix is to add this to the tiny-mce-config.php file:
'document_base_url' => get_option('url'),
This should set the site root as the correct base and allow it to convert the relative links correctly, as the user would expect it to convert them.
Change History (15)
comment:12 @Viper007Bond — 7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
comment:13 @Viper007Bond — 7 years ago
- Milestone 2.5.2 deleted
- Resolution set to worksforme
- Status changed from reopened to closed