Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hannes 5 posts 75 karma points
    Sep 03, 2018 @ 09:07
    Hannes
    0

    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:

    [
      {
        "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!

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Sep 03, 2018 @ 10:56
    Alex Skrypnyk
    0

    Hi Hannes

    What error did you get?

    Alex

  • Hannes 5 posts 75 karma points
    Sep 03, 2018 @ 11:01
    Hannes
    0

    Hi Alex

    In the case of the single item , it returns null and IEnumerable returns a list with 0 items.. no errors.

    Hannes

Please Sign in or register to post replies

Write your reply to:

Draft