The entity changed constraint validation was recently generalized from the node changed constraint. It was/is applied to nodes and taxonomy terms. We should apply them to blocks.

Proposed resolution

Add the proper association to the base field definition. IMHO does not need tests since the constraint itself is tested already.

Remaining tasks


User interface changes


API changes


#2082509: Generalize node changed constraint to entity changed constraint

custom-block-changed-constraint.patch1.07 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 58,771 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Wim Leers’s picture

Patch is trivial, any reason I should not RTBC this right away?

Gábor Hojtsy’s picture

Status: Active » Needs review

I don't have reasons against :)

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

NodeValidationTest tests EntityChangedConstraint, duplicating test coverage here does not make sense (see #2082509-10: Generalize node changed constraint to entity changed constraint).

The consequence is that we just need to add those few lines of metadata to get this functionality.

Hence: RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Wim Leers’s picture

Issue tags: -sprint

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