Description
This happens to me sometimes, but not always. Based on some other behavior I observed with empty lists, my guess is that something triggers the object (don' know what, perhaps something to do with collapsing it) corresponding to the widget to be created. Once created, its fields cannot be left empty as the default for required is true, and thus the entry cannot be published.
Expected behaviour
If required: false and the object widget is left empty in the UI during creation, the entry should be created without raising the validation error toast and it should not contain the object (or at least an empty object).
Steps to reproduce
Here is what I'm working on: https://github.com/Skrubbadubba/static-cms-self-config. It's not a MRE for this particular bug, but it's minimal enough to be good for debugging. Clone it and run npm install && npm run dev && npx @staticcms/proxy-server.
- Create a new entry for the "Collections" collection.
- Enter a
name and a label.
- Inside the "files" list widget there should be one empty object. For that object, enter
file name and label.
- Publish the entry
These should be all the fields that do not have required: false
config.yml
I am not using yaml, but instead js and json. The relevant objects are in config/collections/metaCollection/collections.js, however the entire config object is console logged, it is probably easier to look through it there.
screenshot:
