diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 619c17e..b537120 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -343,6 +343,7 @@ function __sleep() { } $this->fields = array(); $this->fieldDefinitions = NULL; + $this->clearTranslationCache(); return array_keys(get_object_vars($this)); } @@ -352,10 +353,6 @@ function __sleep() { */ public function __wakeup() { $this->init(); - // @todo This should be done before serializing the entity, but we would - // need to provide the full list of data to be serialized. See the - // dedicated issue at https://drupal.org/node/2027795. - $this->clearTranslationCache(); } /**