Try our conversational search powered by Generative AI!

Strange behavior when editing links in TinyMCE

Vote:
 

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?

#200606
Edited, Jan 17, 2019 12:58
Vote:
 

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.'

#200702
Edited, Jan 23, 2019 9:36
Vote:
 

Hi,

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:

EPiServer/CMS/Content/voorlichting/voorzieningen/mediatheek/informatiebronnen/databases,,35726/mtdb/acm-digital-library/47704/?epieditmode=False&epsremainingpath=mtdb/acm-digital-library/47704/

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

Is this a Episerver bug?

#202042
Edited, Mar 12, 2019 13:40
Vote:
 

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. 

#202088
Mar 13, 2019 14:27
Vote:
 

This guy has the similar problem with link transformation.

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2016/5/custom-route-bug/#183361

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($"
{request.Url.AbsolutePath}/{epsremainingpath}");
        }
        base.OnActionExecuting(filterContext);
    }
}
#203388
Apr 20, 2019 13:22
Vote:
 

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.

#203869
May 09, 2019 6:08
Vote:
 

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

#203934
May 13, 2019 8:35
Vote:
 
#211387
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.