Umbraco.Core.Models.PublishedContent.PublishedContentEnumerable' does not contain a definition for 'Split'
Hello,
I successfully upgraded a site from 7.2.6 to 7.5.14 but when upgrading to 7.6.0 I have a breaking change and cannot figure out where to look. I have been looking on this the last 2 days so help is definitely required.
The Homepage use Owl Carousel and the error message is :
Umbraco.Core.Models.PublishedContent.PublishedContentEnumerable' does
not contain a definition for 'Split'
@if (CurrentPage.HasValue("carouselItems")) {
var itemIds = CurrentPage.CarouselItems.Split(new string[] { "," },
StringSplitOptions.RemoveEmptyEntries);
var carouselItems = Umbraco.Media(itemIds);
...
Umbraco.Core.Models.PublishedContent.PublishedContentEnumerable' does not contain a definition for 'Split'
Hello,
I successfully upgraded a site from 7.2.6 to 7.5.14 but when upgrading to 7.6.0 I have a breaking change and cannot figure out where to look. I have been looking on this the last 2 days so help is definitely required.
The Homepage use Owl Carousel and the error message is :
Thank you
Hi Max,
I've just encountered exactly the same issue after upgrading one of my sites. The solution is to explicitly add a .ToString() like so:
@if (CurrentPage.HasValue("carouselItems")) { var itemIds = CurrentPage.CarouselItems.ToString().Split(new string[] { "," },
StringSplitOptions.RemoveEmptyEntries); var carouselItems = Umbraco.Media(itemIds);
I'm surprised that no one else has come back to you about this, it's a pretty major breaking change.
hope this helps,
Cheers,
Damien
is working on a reply...