Closed rensknoors closed 5 years ago
Interesting but unfortunately I can't reproduce this in a clean 8.1.4 install.
No null ref errors when doing this. I must assume it's some configuration problem, custom propertyvalueconverters or something else, not sure.
If you can get more steps to repro then we're all ears.
@nul800sebastiaan in the end we where able to figure out what the issue was. It's important that the setting 'is an element type' is enabled when using in compositions on nested content. The null reference error was there because the modelsbuilder was unable to build.
Shouldn't the backoffice give a warning in cases like these (when editing the document types)?
The same problem occurs when migrating nested content from Umbraco 7.x to Umbraco 8. There is no 'Is an Element type' property in Umbraco 7
I enabled 'Is an Element type' for all nested document types after migration, but it didn't help.
The workaround described above (adding one more document type) helps.
hi guys here is my fix
We noticed that some of our nested content data-types suddenly caused the error 'Object reference not set to an instance of an object.' when trying to get the data of the nested content. After looking into this issue we noticed that it happens when only 1 document-type is configured. When a second one is added, it works as intended.
This issue is already discussed with Umbraco Support and they also seem to think that this is probably a bug.
Reproduction
Bug summary
Nested content doesn't render correctly when only 1 document-type is configured.
Specifics
Version: 8.1.4 Deploy: 3.1.1
Data-type configuration:
Code used to render the nested content:
Steps to reproduce
Expected result
I expect to be able to loop through the nested content data-type and render everything.
Actual result
I get an error and am not able to render the data inside the nested content
Workaround
Adding a second document-type to the nested content fixes the rendering.