November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Peter, I tested this with Alloy with the EPiServer.CMS NuGet package version 11.5.4 (so EPiServer.CMS.AspNet is also 11.5.4) and couldn't reproduce.
I created two pages, page-a and page-b. Then I create a link in tinymce from page-b to page-a. I also added the Button block so there is a content reference property to page-a. Then I changed the address of page-a to page-a-modified. The link in TinyMCE editor content on page-b was correctly updated and so was the content reference based link in the Button block.
Are you using any add-ons to track page URL changes and then to automatically create a redirect from old address to the new address? How are you creating these links that don't work? In the TinyMce editor (which version 1.x or 2.x)? Using a content reference property? Something else?
How are you linking the page and in the view how are you rendering the link?
Hi all thanks for the interest in helping.
I'm not using addons.
Creating links:
On a page I have a block which is rendered in its Xhtml MainBody property (dragged).
This block has a property: EPiServer.Url DetailsUrl, in EPiServer/Cms I click "Create Link" and choose the page.
In the View.cshtml I'm rendering it like so:
<a href="@Model.Current.DetailsUrl">@Model.Current.ChangeContactsText</a>
Where Current is the block type which is populated in the controller Index from the currentPage parameter.
EPiServer.Cms.TinyMce version 2.1.1.0
When hovering the link in the browser, the link says
<a href="/link/a2ef561e1b324b668dbcb3fd6a5c12dd.aspx">Ret kontakter</a>
When clicking the link I am referred to the old Url which is now gone, so I get HTTP Error 404.0 - Not Found. I did reload the page.
Changing the url back to the original in EPiServer/Cms makes the page link work again.
I did try re-adding the link after URL change in the "Create Link" page.
Hi Peter, you should be using the @Url.ContentUrl(Model.Current.DetailsUrl) to render the friendly url of the page.
Hi Antti that works!
Thanks!
A bit odd the old link is referred to when not using @Url.ContentUrl. Seems like the original url has some special meaning.
In your case since you did not use @Url.ContentUrl but wrote out the value directly the link will be the in internal permanent guidbased format. There is a special route that handles those permanent links but that route will do a permanent redirect to the FURL. So in your case you had probably visited that page before and therefore had the browser cached the redirection (which was with the old segment)
In the Episerver CMS: changing "Name in URL" after the page has been published and linked to doesn't seem to work. Links still use the old URL. Even after remove/add.
Previous links refer to the old url which doesn't exist anymore, but the new url however does work.
What gives? I'm on Episerver.Cms.AspNet 11.3.4.0