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?
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...
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!
Hi Chris,
You will need to set the
EnablePropertyValueConverters
setting in the Content element ofumbracoSettings.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
Absolute magic!
That did the trick - thanks for the swift reply, Jeavon!
Chris
is working on a reply...