Simple widget - can't save node without adding referenced entity even though entity ref is not required

Created on 25 February 2023, almost 2 years ago
Updated 13 January 2024, 11 months ago

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.

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States banoodle San Francisco, CA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @banoodle
  • πŸ‡ΊπŸ‡ΈUnited States banoodle San Francisco, CA

    Oh and I noticed this code and the comment that seems to be targeted at the very thing I am experiencing. It seems this code is not working as expected...

  • Status changed to Closed: duplicate 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    Yep, same issue. Thank you for your report. I've added a reference for this issue to the other issue that's in progress.

Production build 0.71.5 2024