Try our conversational search powered by Generative AI!

Strange behavior when editing links in TinyMCE


We have encountered some strange behavior when editing links in the TinyMCE editor. When creating a link using the "Page" radio button and entering "Remaining url" the information is not preserved correctly. The behavior is only reproducible inside a TinyMCE editor, not on Url properties.

It occurs on a freshly installed Alloy site with all the latest updates, namely:

Episerver 11.11, TinyMCE 2.7.1

How to reproduce:
1. In Cms Edit: open a page with a XhtmlString property (such as About us on Alloy)
2. Enter some text and select Insert link
3. Choose Page and select a page
4. Enter a value in Remaining Url
5. Publish

At this point the link works correctly

6. Reload Cms Edit window
7. Click Insert/edit

At this point the link is changed to External

8. Edit any part of the XhtmlString to trigger a Save then Publish

The link no longer works and instead looks something like on the public site: /EPiServer/CMS/Content/en/alloy-plan,,6/test?epieditmode=False&epsremainingpath=test

Is this a known bug? Is there a workaround?

Edited, Jan 17, 2019 12:58

I just ran into the same problem.
this also causes the Link Validation scheduled job to fail with 

'This operation is not supported for a relative URI.'

Edited, Jan 23, 2019 9:36


i just received this bug from a client also from within the RTE. And i can reproduce it exactly using the way Mattias described.

In my case i'm also on Episerver 11.11 but on TinyMCE 1.1.0

On initial publish the link works correctly, but if you change a random text in the RTE the second time, (without touching the link), and publish again, this breaks the link and you get a weird link. 

Which looks something like this:


My link was : /voorlichting/voorzieningen/mediatheek/informatiebronnen/databases/  and the remaining url was mtdb/acm-digital-library/47704/

Is this a Episerver bug?

Edited, Mar 12, 2019 13:40

I found that if you just enter a normal value in the "remaining url" property it breaks the second time. 

But if you try to add querystring params in "remaining url" like for example "?query=test" . Then it keeps working. 

I cannot just add some extra url to the "remaining url" like "mtdb/acm-digital-library/47704/"  (Which is in my case a virtual url for a page)

Anyone any idea how to get around this issue?

I also updated to the latest version of EPi. 

Mar 13, 2019 14:27

This guy has the similar problem with link transformation.

I didn't find any proper explanation of such behavior and solution for that. Had to write `EpsremainingpathFilterAttribute`.

public class EpsremainingpathFilterAttribute : ActionFilterAttribute {

    public override void OnActionExecuting(ActionExecutingContext filterContext) {
        var request = filterContext.RequestContext.HttpContext.Request;
        var epsremainingpath = request.QueryString["epsremainingpath"];
        if(!string.IsNullOrEmpty(epsremainingpath)) {
            filterContext.Result = new RedirectResult($"
Apr 20, 2019 13:22

Are you using the default TinyMCE link plugin? I found in the episerver docs they recommend using the epi-link plugin over the default TinyMCE link plugin.

May 09, 2019 6:08

in my case i am using the epi-link plugin and not the default one... 

May 13, 2019 8:35
Jan 07, 2020 8:30
* 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.