From 223ed41c53db7e4fd1f6128d3d7abe78c683d798 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 14 Mar 2017 10:24:31 +0100 Subject: [PATCH] Use the extension method to get published content item - consistent with other PVCs --- .../LegacyRelatedLinksEditorValueConvertor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs index 4282554cba..e29208ea3b 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs @@ -65,11 +65,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters break; case Constants.PropertyEditors.RelatedLinks2Alias: var strLinkId = a.Value("link"); - var udiLinkId = strLinkId.TryConvertTo(); - if (udiLinkId) + var udiAttempt = strLinkId.TryConvertTo(); + if (udiAttempt) { - var udiLink = helper.UrlProvider.GetUrl(udiLinkId.Result.Guid); - a["link"] = udiLink; + var content = udiAttempt.Result.ToPublishedContent(); + a["link"] = helper.NiceUrl(content.Id); } break; }