Copied to clipboard

Flag this post as spam?

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


  • K.Garrein 164 posts 629 karma points
    Nov 24, 2018 @ 13:38
    K.Garrein
    0

    Checkbox data type always returns False - Umbraco 7.12.4 assembly: 1.0.6879.21982

    Hey guys.

    It looks like the "True/False" datatype disappeared in the new Umbraco version (7.12.4 assembly: 1.0.6879.21982)?

    It seems to have been replaced by the "Checkbox" datatype?

    However the "checkbox" datatype always seems to returns "False". I think this might be a bug?

    My code:

    bool actief = contentNode.GetPropertyValue<bool>( "actief" );
    

    Help please :)

  • K.Garrein 164 posts 629 karma points
    Nov 24, 2018 @ 14:00
    K.Garrein
    0

    Hmm, also the "children" of those content nodes are empty, so there might be something else going on =-)

  • K.Garrein 164 posts 629 karma points
    Nov 25, 2018 @ 09:32
    K.Garrein
    100

    I solved my problem by switching from "Umbraco.TypedContent( id )" to using the ContentService.

    I was coding a surface controller, and for unknown reason (for me anyway) retrieving content from the Umbraco node tree using "Umbraco.TypedContent" is giving a lot of issues!? (Like not filling properties correctly, but also being unable to retrieve childnodes)

    Is this a known issue? Or maybe it is not advised to work that way in surface controllers?

    In any case, it works fine when I switch to the ContentService, so consider this post as solved.

    Cheers.

Please Sign in or register to post replies

Write your reply to:

Draft