diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 67d06e912b..f48113b29d 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -289,7 +289,9 @@ public function preSave() { // Make sure the parent knows we are updating this property so it can // react properly. $this->target_id = $this->entity->id(); - $this->target_revision_id = $this->entity->getRevisionId(); + if ($this->getSetting('reference_revisions')) { + $this->target_revision_id = $this->entity->getRevisionId(); + } } if (!$this->isEmpty() && $this->target_id === NULL) { $this->target_id = $this->entity->id();