Closed mjbarlow closed 5 years ago
Hey @mjbarlow
There has been a breaking change in 8.1 when it comes to property value converters. So the package developers need to fix it.
I needed to do it for one of my packages as well
Dave
Hi @mjbarlow
I just checked and this was a breaking change in 8.1 that was not clear from the list of breaking changes in 8.1
If I am correct this is caused by https://github.com/umbraco/Umbraco-CMS/issues/5170
So you will need to fix this in your package.
Dave
In previous versions of 8, I know this worked in 8.0.2. when using ModelsBuilder to generate models of data that use custom property editors then the property value converter for that custom property would fire and generate the models with the custom type. (Making the property strongly typed).
Since upgrading to version 8.1+ of Umbraco the property value converter is ignored, instead object is the property type.
Reproduction
Clean install of Umbraco 8.2, then add a third party property editor via nuget, either mine: https://www.nuget.org/packages/FontAwesomePropertyEditor/ should return either IEnumerable or FaLink
or Giphy property editor: https://www.nuget.org/packages/GiphyPropertyEditor/ (which should return string, see the source code of the property value converter)
Add a property using one of these editors, run models builder, verify that property is object and not the type declared in the value converter.
Bug summary
Modelsbuilder returning object not strongly typed model for custom property editors.
Specifics
V8.2 - but believe this has been around since 8.1
Steps to reproduce
See above.
Expected result
Strongly typed model
Actual result
Object