Closed jenlampton closed 3 years ago
Hm... Well, I fixed the validation, but I'm still getting some errors. I seem to have the same problem with a multi-value integer field, though, so this may be a core issue... see https://github.com/backdrop/backdrop-issues/issues/3873 for more on that. Posting a PR here for more robust validation shortly.
Hm, the field widgets in the screenshot look more like a link field than a reference field.
@olafgrabienski thanks, yeah that was the wrong screenshot :) -- removed
Well, #49 doesn't seem to solve all the problems. I'm still seeing:
EntityStorageException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_ref_interviews_target_id' at row 1 in NodeStorageController->save() (line 510 of backdrop/core/modules/node/node.entity.inc).
`1`
Well, it's a bit of a hack, but I implemented hook_field_insert()
to remove any $items
that had empty values, and now my nodes save without fatal errors.
I have added an autocomplete reference field to a content type. It has an unlimited number of values, so that on the node/add form there are several (empty) fields displayed.
When I save this node without adding values into the reference field, I get a fatal error:
I think we need some additional validation on the field so that it doesn't attempt to save an empty string.