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 188.8.131.52
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?
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.
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.
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:
What this means, as you realized, is that it's easier to use another parameter name!
Thanks for your explanation!