I have upgraded sucessfully a site from 7.2.6 to 7.5.14 but when upgrading to 7.6, things get nasty.
'Umbraco.Core.Models.PublishedContent.PublishedContentEnumerable' does not contain a definition for 'Split'*
Line 19: @if (CurrentPage.HasValue("carouselItems")) {
Line 20: var itemIds = CurrentPage.CarouselItems.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
Line 21: var carouselItems = Umbraco.Media(itemIds);
Since version 7.6 Umbraco Property Value Converters are part of the core, it means that CurrentPage.CarouselItems returns list of PublishedContents, not list of ids.
Now life of developers easier, you can just iterate over list:
var carouselItems = CurrentPage.CarouselItems
Is the same as:
var itemIds = CurrentPage.CarouselItems.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
var carouselItems = Umbraco.Media(itemIds);
Also, you can turn off Property Value Converters, look at umbracoSetting.config setting: in section settings/content, setting EnablePropertyValueConverters needs to be present and true to activate them.
Issue when upgrading to 7.6
Hello,
I have upgraded sucessfully a site from 7.2.6 to 7.5.14 but when upgrading to 7.6, things get nasty.
Does anyone can point me where to look?
Thank you
Hi Max
Since version 7.6 Umbraco Property Value Converters are part of the core, it means that CurrentPage.CarouselItems returns list of PublishedContents, not list of ids.
Now life of developers easier, you can just iterate over list:
Is the same as:
Also, you can turn off Property Value Converters, look at umbracoSetting.config setting: in section settings/content, setting EnablePropertyValueConverters needs to be present and true to activate them.
Read more about breaking changes for version 7.6:
https://our.umbraco.org/documentation/getting-started/setup/upgrading/760-breaking-changes
Thanks,
Alex
Hi Alex,
I found the switch after posting my comment. It works well but your comments makes me want to switch it back and modify the code :)
Returning objects instead of csv style strings is definitely better to reason about :)
I am discovering Umbraco to get a different taste and experience. I am coming from PHP.
Thank you for the support.
Best
Maxime
Definitely, new way of working with data in Umbraco is cool, enjoy it.
is working on a reply...