Created
May 18, 2016 14:04
-
-
Save pvhee/14801e0f82e06f51cb0d88b9d400cbd6 to your computer and use it in GitHub Desktop.
PLAT-235_paragraph_constraint_violation.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php | |
index b1fee2a..5f954c3 100644 | |
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php | |
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php | |
@@ -16,7 +16,7 @@ class EntityChangedConstraintValidator extends ConstraintValidator { | |
public function validate($entity, Constraint $constraint) { | |
if (isset($entity)) { | |
/** @var \Drupal\Core\Entity\EntityInterface $entity */ | |
- if (!$entity->isNew()) { | |
+ if (!$entity->isNew() && $entity->getEntityTypeId() != 'paragraph') { | |
$saved_entity = \Drupal::entityManager()->getStorage($entity->getEntityTypeId())->loadUnchanged($entity->id()); | |
// A change to any other translation must add a violation to the current | |
// translation because there might be untranslatable shared fields. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment