Copied to clipboard

Flag this post as spam?

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


  • roli81 7 posts 58 karma points
    Oct 20, 2023 @ 14:38
    roli81
    0

    Can't get content from an image field from a Icontent Object

    Hi folks

    I hav a strange behavior by getting a field value from a IContent object in UMbraco 12.2.0 When I call the Follow:

            IContent page =  _contentService.GetById(123);
            page.GetValue("images");
    

    I get the FQN of the content: "System.Collections.Generic.List`1[Umbraco.Cms.Core.Udi]" as string.

    So I think there is content in the field (I can see it also in the backoffice). But when I try this:

            IContent page =  _contentService.GetById(123);
            page.GetValue<IEnumerable<Umbraco.Cms.Core.Udi>>("images");
    

    I always get null.

    Any ideas?

    Greetings Roland

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies