Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Cannot enter internal links with a querystring in TinyMCE

Vote:
 

Hello,

I'm trying to insert a link to an internal page with a querystring in a TinyMCE field. We are using TinyMCE version 4.8.5 with Episerver 11.11.2.0

If I insert a page link in combination with the remaining URL field for the querystring, the querystring disappears after saving the page.

If I insert an external link, including the querystring, the link is changed into a Page link, with the querystring in the remaining URL field. This link is not shown in the page, and after opening the link editor, the querystring is visible, but disappears after clicking OK.

Is this a known bug? Does anybody have a solution for this?

Yours,

John Ligtenberg

#202210
Mar 19, 2019 16:00
Vote:
 

Hi John,

I can't recreate this in Alloy and couldn't see a bug related to it in the bug list.

Packages seem to align with yours: EPiServer.CMS.Core 11.11.2, EPiServer.CMS.UI 11.17.1 and EPiServer.CMS.TinyMce 2.7.1.

/Jake

#202214
Mar 19, 2019 16:35
Vote:
 

Hello Jake,

Thanks for your prompt reply. It appears that when the name of the query string parameter is "id" it is removed. If the query string parameter name  is anything else (e.g. "employeeid" or "eid") , it is not removed.

I guess we will have to use a different query string parameter name.

I hope this will be treated as bug though.

Yours,

John

#202215
Mar 19, 2019 17:15
Vote:
 

Ah ok.

Yeah, you can't use id as Epsierver reserves it for routing—Valdis wrote a very succicient summary here.

I wouldn't consider it a bug, in fact it is explicitly removed when saving a Url. The setter for the String property on a PropertyUrl calls the DefaultUrlResolver.TryToPermanent method which in turn calls the PermanentLinkBuilder.IsPermanentLink method, which removes the ID:

url.QueryCollection.Remove("id");

What this means, as you realized, is that it's easier to use another parameter name!

#202221
Edited, Mar 19, 2019 19:42
Vote:
 

Hi Jake,

Thanks for your explanation!

#202228
Mar 20, 2019 9:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.