This is possibly related to
Required fields make an optional IEF (erroneously) required
π
Required fields make an optional IEF (erroneously) required
Needs work
except in my case I haven't made any custom fields on the child entity required. However the Title property is required, so maybe this is the same issue? It feels like a larger issue as I can't effectively use the simple widget - even when no required fields are involved.
I applied
patch #24
π
Required fields make an optional IEF (erroneously) required
Needs work
from that issue. It applied without error but didn't help my scenario so maybe this is a separate issue.
I tried to understand what is going on with my debugger but I'm stumped as to how to resolve this.
Description (recycled and edited from the possibly related issue)
I have a content type with an optional entity reference to a second content type. I would like to be able to use IEF in such a way that the creation of the referenced entity remains optional. If this is possible, I would like to know what settings are necessary. If it's not possible, I would like that verified, and have this noted as a feature request.
My current settings:
The entity reference field is not required. It references a single content type, allowing the creation of new entities. Multiple references are allowed.
The form display of the parent can be set to either Inline entity form - Simple or Inline entity form - Complex. Setting the form to collapsed and/or collapsed by default has no effect on the observed behavior.
I'm not having any issues with the complex widget, but I REALLY like how the simple one works and would love to be able to use it.
Observed behavior:
It is impossible to save a parent entity without a reference to a child.
Expected/Desired behavior:
To have some mechanism of saving a parent without any reference, since the reference is optional.
Or I would even be pretty happy if I could at least delete the empty reference form - but that does not work (no error - just doesn't get removed)
I think this might overlap with this
core issue
π
Allow for deletion of a single value of a multiple value field
Fixed
of not being able to delete entity references, but those (9.x) patches didn't help me either.