core/lib/Drupal/Core/Entity/ContentEntityBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index b72121b..575f1a4 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -265,7 +265,7 @@ public function postCreate(EntityStorageInterface $storage) { if ($this->isDefaultTranslation()) { $this->newRevision = TRUE; } - $this->dirtyFields = []; + $this->dirtyFields[$this->activeLangcode] = []; } /** @@ -401,7 +401,7 @@ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $reco public function postSave(EntityStorageInterface $storage, $update = TRUE) { parent::postSave($storage, $update); - $this->dirtyFields = []; + $this->dirtyFields[$this->activeLangcode] = []; // Update the status of all saved translations. $removed = []; @@ -581,7 +581,7 @@ public function getFields($include_computed = TRUE) { * {@inheritdoc} */ public function getDirtyFields() { - return array_intersect_key($this->getFields(), $this->dirtyFields); + return array_intersect_key($this->getFields(), $this->dirtyFields[$this->activeLangcode]); } /** @@ -722,7 +722,7 @@ protected function updateFieldLangcodes($langcode) { */ public function onChange($name) { // Add the field to the changed fields list. - $this->dirtyFields[$name] = TRUE; + $this->dirtyFields[$this->activeLangcode][$name] = TRUE; // Check if the changed name is the value of an entity key and if the value // of that is currently cached, if so, reset it. Exclude the bundle from