Copied to clipboard

Flag this post as spam?

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


  • Jin Botol 134 posts 287 karma points
    Apr 23, 2018 @ 06:46
    Jin Botol
    0

    Some codes is not working in latest version of UmbracoCms

    Hi

    I upgrade my UmbracoCms from 7.5.6 to 7.10.3 and after upgrading, some of my codes is not working anymore. like for example below:

    var stories = Model.Content.GetPropertyValue<string>("stories").TypedContentList();
    var root = UmbracoExtensions.GetRootNode();
    var footerNames = new List<string>();
    var footerNodes = new List<IPublishedContent>();
       if (root != null)
       {
                footerNames = root.GetPropertyValue<string>("footerColumnNames").NodeSpliter();
                footerNames = root.GetPropertyValue<string>("footerColumnNames").ToSafeString().Split(',');
    
        }
    

    Any ideas about this? Help me please.

    Regards,

    Jin

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 23, 2018 @ 07:07
    Alex Skrypnyk
    1

    Hi Jin

    What property editor are you using for "stories" property?

    If it's multinode tree picker - you don't need to do TypedContentList()

    Now you can get a list of nodes like that:

    var stories = Model.Content.GetPropertyValue<IPublishedContent>("stories");
    

    Thanks,

    Alex

  • Jin Botol 134 posts 287 karma points
    Apr 23, 2018 @ 07:20
    Jin Botol
    0

    Yes, It's working now. Thanks

    Do you ideas or documentation about why is my code is not working the latest version?

    Because almost all my website pages have an error. And I don't what's going on, I think my code is obsolete?

    Regards,

    Jin

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 23, 2018 @ 08:16
    Alex Skrypnyk
    0

    Since Umbraco 7.6 Property Value converters are in Umbraco core, read more here - https://our.umbraco.org/documentation/getting-started/setup/upgrading/version-specific#property-value-converters

    You can disable it by the configuration setting set to false () - yet the content picker ignored this setting.

  • Jin Botol 134 posts 287 karma points
    Apr 23, 2018 @ 09:11
    Jin Botol
    0

    Hi Alex,

    Thanks for your help,

    but where I can disable this , I'm really new in Umbraco.

    Regards,

    Jin

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 23, 2018 @ 09:23
    Alex Skrypnyk
    1

    /config/umbracoSettings.config - <EnablePropertyValueConverters>false</EnablePropertyValueConverters>

  • Jin Botol 134 posts 287 karma points
    Apr 24, 2018 @ 03:16
    Jin Botol
    0

    Hi Alex,

    It's now working but I think my Helpers/ImageHelpers is not working after upgrading to UmbracoCms 7.10.3?

    Regards,

    Jin

Please Sign in or register to post replies

Write your reply to:

Draft