Copied to clipboard

Flag this post as spam?

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


  • Chris Roberts 3 posts 83 karma points
    May 19, 2017 @ 12:36
    Chris Roberts
    0

    Problem with Dynamics after Upgrade from 7.3 to 7.6

    Hello,

    We have inherited the code for a project which was built on Umbraco v7.3 that makes quite extensive use of dynamics, with code such as this...

    var SliderIds = CurrentPage.sliderImages.Split(',');
    

    We have recently upgraded the project to v7.6 and this line of code is now failing. Looking at the debugger, CurrentPage.sliderImages is now a List of IPublishedContent objects. I assume (looking at the existing code) that this used to just return a comma separated list of IDs.

    I'm assuming this is a change in behaviour in Umbraco, but I've not really done much work with the dynamic side of things.

    I'd rather not refactor all of the code in the project if I can avoid it... can anyone point me in the direction of a config change I might be able to make to change the behaviour to match the 'old' way of doing things?

    Thanks!

  • Jeavon Leopold 2906 posts 12398 karma points admin mvp c-trib
    May 19, 2017 @ 12:57
    Jeavon Leopold
    102

    Hi Chris,

    You will need to set the EnablePropertyValueConverters setting in the Content element of umbracoSettings.config to false to continue to use Dynamics.

    Upgrades should by default have it set to false depending on how you upgraded to ensure compatibility.

    See the upgrading section here

    Jeavon

  • Chris Roberts 3 posts 83 karma points
    May 19, 2017 @ 13:02
    Chris Roberts
    0

    Absolute magic!

    That did the trick - thanks for the swift reply, Jeavon!

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft