Support validation on new entity/validation not performed on new entities

Created on 9 May 2023, over 1 year ago
Updated 25 June 2024, 5 months ago

Problem/Motivation

I'm marking this as a bug because (IMO) this is a bit of a WTF condition, and results in invalid data being saved to the field storage when entity validation is performed.

Steps to reproduce

Save a new entity with a state field set to an invalid state ID.

Proposed resolution

Support validation on new entity save.

Remaining tasks

Test.

User interface changes

None.

API changes

None, I don't think? Entity validation is unfortunately not performed as often as it should be in Drupal, so it's possible that "fixing" this may reveal invalid configurations on sites that do perform consistent entity validation, e.g. if you're using JSON:API.

Data model changes

None.

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇺🇸United States bradjones1 Digital Nomad Life

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024