U4-645 - TinyMCE

Created by Sebastiaan Janssen 19 Aug 2012, 14:55:14 Updated by Shannon Deminick 21 Jun 2017, 07:52:13

With domain prefixes enabled, it is impossible to link to a page which is on the domain which is the same as the one a backoffice user is using umbraco on.

Example Domains assigned in Umbraco, domain prefixes on: domain1.com domain2.com

  • Logged into domain1.com/umbraco/
  • Add a link via tinymce to a page (/some/page/) of domain1.com from a page of domain2.com

Expected result An absolute url, including hostname, should be inserted/maintained: http://domain1.com/some/page/

Actual result The link picker shows the correct url, but once inserted tinymce strips the host part. The link becomes /some/page/. Switching to code view doesn't help.

Because the linking page is on domain2.com, the relative url means it will end up pointing to http://domain2.com/some/page/, which of course isn't there.

Cause The cause of this bug is located in umbraco.editorControls/tinyMCE3/tinyMCE.cs.

The following code forces absolute host-based urls to be stripped from the hostname whenever the hostname is equal to the hostname of the page tinymce is hosted on. config.Add("document_base_url", "/"); config.Add("relative_urls", "false"); config.Add("remove_script_host", "true");

Fix When domain prefixes are enabled, add an additional configuration option to prevent any url rewriting. config.Add("relative_urls", "false");

Workaround Log in to umbraco on the domain you want to link from. In the example that would be domain2.com

Suggestion Allow LocalLink even when useDomainPrefixes is True, just resolve to the first applicable domain setting for that page if the page is not a 'local' page.

Maybe an additional settings would be appropriate? resolveDomainForLinks

I would be willing to contribute this suggestion.

''Originally created on CodePlex by [bluecherry|http://www.codeplex.com/site/users/view/bluecherry]'' on 8/8/2012 11:46:21 AM [Codeplex ID: 30985 - Codeplex Votes: 3]


Shannon Deminick 21 Jun 2017, 07:52:14

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: