diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php index dbb5ddd..29de710 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php @@ -230,6 +230,9 @@ protected function attachPropertyData(&$records, $load_revision = FALSE) { } $data = $query->execute(); + // Fetch the field definitions to check which field is translatable. + $field_definition = $this->getFieldDefinitions(array()); + foreach ($data as $values) { $id = $values[$this->idKey]; // Field values in default language are stored with LANGUAGE_DEFAULT as @@ -237,7 +240,10 @@ protected function attachPropertyData(&$records, $load_revision = FALSE) { $langcode = empty($values['default_langcode']) ? $values['langcode'] : LANGUAGE_DEFAULT; foreach ($this->entityInfo['schema_fields_sql']['data_table'] as $name) { - $records[$id]->{$name}[$langcode][0]['value'] = $values[$name]; + // Set translatable properties only. + if (!empty($field_definition[$name]['translatable'])) { + $records[$id]->{$name}[$langcode][0]['value'] = $values[$name]; + } } } }