Problem/Motivation

    $violations = $entity->validate();

If other parts of the entity are invalid -- this can happen with migrated entities! Or if constraints are added to existing data -- then the violations will cause getNextStateName() to say the next state is not reachable.

Steps to reproduce

Proposed resolution

Validate just the field.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

nakaza sora made their first commit to this issue’s fork.

nakaza sora’s picture

Assigned: Unassigned » nakaza sora

nakaza sora’s picture

Assigned: nakaza sora » Unassigned
Status: Active » Needs review

I have created a merge request.
Could you please review the merge request when you have time?
Thank you!

  • joachim committed 8d651f44 on 1.0.x authored by nakaza sora
    fix: #3564012 validate only the field for the next state, as validating...
joachim’s picture

Status: Needs review » Fixed

Perfect, thanks!

And documentation comments too -- great! :)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.