I have…
- [x] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [x] Bug report
- [ ] Performance issue
- [ ] Documentation issue or request
Current behavior
When using the C# SquidexClient to create content for schemas where some of the values for fields are null, those fields with null values are not in the created content’s data.
E.g.
After creating content for schema with two fields Title and Name, but setting Name as null, this is the data we see in Squidex and the API:
"data": {
"Title": {
"iv": "Test"
}
}
Expected behavior
The content’s data should show the fields with a null value.
E.g.
"data": {
"Title": {
"iv": "Test"
},
"Name": {
"iv": null
}
}
Minimal reproduction of the problem
- Create a schema with nullable fields
- Use the SquidexClient to create some contents for that schema with one or more of the fields null
- Check the content’s data in Squidex on the ‘Inspect’ tab or by querying the API - the fields with null values are not in the data
Environment
App Name: n/a
- [x] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: More stories (#873) (Revision: 377fe120d74085bac86607674b244855cab0215b)
Browser:
- [x] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Others:
Noticed this because we have some scripts that fire on the ‘change’ event (specifically when publishing) to populate some fields that are set to ‘Required on publish’, but because those fields were migrated to Squidex with null values they are not in the data so I cannot set the values. Or maybe it is possible but I just don’t know how!
Note that as soon as we have saved the problem content using the Squidex UI, even without making any changes, those fields do exist as expected with null values.