November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Aug 17, 2016
Nov 08, 2016
CMS Core
Closed, Fixed and tested
The PropertyLinkCollection inherits from PropertyXhtmlString but doesn't populate the XhtmlString value if the value is set to a LinkCollection.
This has a few side effects, primarily that all links are removed if RemapPermanentLinkReferences is called.
Example unit test from PropertyLinkCollectionTest.cs.
[Fact] public void RemapPermanentLinkReferences_WhenLinksAreSet_ShouldRemapLinks() { var originalGuid = Guid.NewGuid(); var remappedGuid = Guid.NewGuid(); var property = new PropertyLinkCollection(); property.Links = new LinkItemCollection { new LinkItem { Href = PermanentLinkUtility.GetPermanentLinkVirtualPath(originalGuid, ".txt"), UrlResolver = UrlResolver() } }; var map = new Dictionary<Guid, Guid> { { originalGuid, remappedGuid } }; property.RemapPermanentLinkReferences(map); var expected = PermanentLinkUtility.GetPermanentLinkVirtualPath(remappedGuid, ".txt"); Assert.Equal(expected, property.Links[1].Href); }
Breaking Changes