Try our conversational search powered by Generative AI!

email-link is changed on publishing.



When editors add email-links to xhhtml fields in DXP CMS 12.23.0 the link is changed to a link to the startpage on publishing.

This is what it looks like after adding it:
<a title="mytitle" href="" target="_blank" rel="noopener"></a>

But after publishing it gets changed to:
<a title="mytitle" href="/EPiServer/CMS/Content/nb-NO/,,5/?epieditmode=false" target="_blank" rel="noopener"></a>
(5 is the id of the startpage)

Anyone have any clues to why this is happening and how I can fix it?

Feb 02, 2024 8:50


I've tried to recreate the issue on a blank alloy site and I think I have an idea of why that might be happening. I'd guess you have your domain ( in your example above) set up as a host in your site config. Under normal circumstances, if you add a link to any URL on any of the hosts defined in the current site's config, it will be rewritten to be a reference to the page on the end of that URL (the advantage being that, if anyone changes the URL of the page in the CMS, the link updates too). In this instance, the email address is incorrectly being identified as a standard URL and is being rewritten as a link to the homepage (as there's no path beyond the domain). That sounds like a bug to me (though, arguably, is a valid URL where everything before the @ symbol represents authentication details so I can see how this may have occurred).

In the question, you implied that your site is hosted in the DXP service which would generally mean that the site wouldn't be available on the apex domain (i.e. the site wouldn't be available on "" but would be available on ""). If that's correct, you could resolve the issue by removing the domain without the "www" from your list of hosts. If your site is set up to respond to the domain without the www then the only option I can think of would be to raise the issue as a bug with support.

Feb 02, 2024 13:27

What version of EPiServer.CMS.Core are you using? Might need to update it to 12.19.1 (or higher) -- 

Edited, Feb 02, 2024 15:31

Thanks. Upgrading EPiServer.CMS.Core from 12.18 to 12.19 solved the problem.

Feb 19, 2024 7:17

This is still an issue in EPiServer.CMS 12.26.1.

// Fredrik

Feb 23, 2024 7:20

Yep. The dependencies in the EPiServer.CMS package (even the latest version - 12.27.0) basically equate to EPiServer.CMS.Core >= 12.19.0 which, due to Nuget's "Lowest applicable version" rule, results in 12.19.0 being used rather than 12.19.1 (which contains the fix).

In theory, you could update the transitive packages however it's not quite that simple. EPiServer.CMS.Core is a few levels deep in the dependency tree and the version dependency is specified exactly in some of the packages above so any attempt to update that, either directly or through updating the top-level transitive packages, would fail due to it breaking other parts of the dependency tree. You could manually add explicit dependencies on the 12.19.1 packages but, in doing that, you're probably just pushing the dependency problem down the line so maybe the best bet is to wait for Optimizely to update the EPiServer.CMS package.

Feb 23, 2024 10:26
Fredrik Johansson - Feb 23, 2024 12:29
Thank you for claryfying the dependency chain problem Paul. I will take your advice in not referencing Core directly. Hopefully propagation of this fix will be prioritized in a near CMS-update.

It looks as though the latest version of the EPiServer.CMS package (12.27.1) has updated the dependencies so it will now pull in version 12.20.2 of EPiServer.CMS.Core rather than 12.19.0. That should mean that if you upgrade to the latest version of EPiServer.CMS, the email link bug should be resolved.

Feb 29, 2024 17:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.