Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello
So I've recently upgraded from Umbraco 7.2.8 to 7.12.1, which means i had to upgrade my RJP.MultiUrlPicker, which now works differently.
Some info:
var homepagenode = Umbraco.TypedContentAtRoot().Where(t => t.DocumentTypeAlias == "Home").FirstOrDefault();
var youtubeNode = homepagenode.Descendant("Youtube");
This used to work:
youtubeNode.GetPropertyValue<MultiUrls>("channelLink").FirstOrDefault()?.Url
I've tried both these, which haven't worked:
youtubeNode.GetPropertyValue<IEnumerable<Link>>("channelLink").FirstOrDefault()?.Url
youtubeNode.GetPropertyValue<Link>("channelLink")?.Url
The weird thing is, if I do this:
var contentService = ApplicationContext.Current.Services.ContentService;
contentService.GetById(youtubeNode.Id).GetValue<string>("channelLink")
I get the following:
[ { "name": "JustMoney Youtube", "url": "https://www.youtube.com/channel/UCfpeoMGhUqZ0q4gxRbPRncg", "target": "_blank", "icon": "icon-link" } ]
Any idea as to why "Link" is not working?
I urgently need some help please!
Hi Hannes
What error did you get?
Alex
Hi Alex
In the case of the single item , it returns null and IEnumerable returns a list with 0 items.. no errors.
Hannes
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Multi Url Picker not working after upgrade
Hello
So I've recently upgraded from Umbraco 7.2.8 to 7.12.1, which means i had to upgrade my RJP.MultiUrlPicker, which now works differently.
Some info:
var homepagenode = Umbraco.TypedContentAtRoot().Where(t => t.DocumentTypeAlias == "Home").FirstOrDefault();
var youtubeNode = homepagenode.Descendant("Youtube");
This used to work:
youtubeNode.GetPropertyValue<MultiUrls>("channelLink").FirstOrDefault()?.Url
I've tried both these, which haven't worked:
youtubeNode.GetPropertyValue<IEnumerable<Link>>("channelLink").FirstOrDefault()?.Url
youtubeNode.GetPropertyValue<Link>("channelLink")?.Url
The weird thing is, if I do this:
var contentService = ApplicationContext.Current.Services.ContentService;
contentService.GetById(youtubeNode.Id).GetValue<string>("channelLink")
I get the following:
Any idea as to why "Link" is not working?
I urgently need some help please!
Hi Hannes
What error did you get?
Alex
Hi Alex
In the case of the single item , it returns null and IEnumerable returns a list with 0 items.. no errors.
Hannes
is working on a reply...