AndyButland / UmbracoPersonalisationGroups

Package for personalisation of content with Umbraco.
MIT License
38 stars 18 forks source link

Update to handle UDI picker format in Umbraco.Core 7.6+ #8

Closed paulsterling closed 7 years ago

paulsterling commented 7 years ago

I think this'll do it...will be for 7.6+ only so breaks backwards compatibility if that's acceptable. Else can handle with a new build version or otherwise.

https://github.com/AndyButland/UmbracoPersonalisationGroups/issues/7

AndyButland commented 7 years ago

Thanks @paulsterling - I'll check this out. Was my understanding though that this: content.GetPropertyValue<IEnumerable<IPublishedContent>>(propertyAlias) would only work if this was installed. Otherwise you'd get back the raw value, which was a CSV for ints (but seemingly now a different format of Ids). But maybe that's included in core now too? Know there was discussion about that previously but can't find the issue on the tracker right now.

Anyway, will install 7.6 and test it out. Thanks for flagging and hopefully also fixing!

AndyButland commented 7 years ago

Thanks again @paulsterling - have replicated the issue you've pointed out and read now that the property converters for the content pickers are included in 7.6. So have resolved it in a slightly different way - see this commit - which maintains backward compatibility. Basically I look for the data in the new format, and if not found, fallback to the old way looking for the CSV of integer node Ids. Released in version 0.2.6,

paulsterling commented 7 years ago

Perfect @AndyButland - thanks for the super quick (real) fix and release