diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php index 2bed3f6..7f2ed38 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -653,11 +653,8 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { $langcodes = $field['translatable'] ? array_keys($entity->getTranslationLanguages()) : array(Language::LANGCODE_NOT_SPECIFIED); foreach ($langcodes as $langcode) { - $items = $entity->getTranslation($langcode)->{$field_name}->getValue(); - if (!isset($items)) { - continue; - } $delta_count = 0; + $items = $entity->getTranslation($langcode)->get($field_name)->filterEmptyValues(); foreach ($items as $delta => $item) { // We now know we have someting to insert. $do_insert = TRUE; @@ -670,9 +667,8 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { ); foreach ($field['columns'] as $column => $attributes) { $column_name = static::_fieldColumnName($field, $column); - $value = isset($item[$column]) ? $item[$column] : NULL; // Serialize the value if specified in the column schema. - $record[$column_name] = (!empty($attributes['serialize'])) ? serialize($value) : $value; + $record[$column_name] = (!empty($attributes['serialize'])) ? serialize($item->$column) : $item->$column; } $query->values($record); $revision_query->values($record); diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php index d7433ee..3efe397 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerTranslationTest.php @@ -98,8 +98,8 @@ protected function setUp() { // translated interface. $submit_value = (string) current($this->xpath('//input[@type="submit"]/@value')); - // Submit the minimal profile installation. - $this->drupalPostForm(NULL, array('profile' => 'minimal'), $submit_value); + // Submit the standard profile installation. + $this->drupalPostForm(NULL, array('profile' => 'standard'), $submit_value); // Submit the next step. $this->drupalPostForm(NULL, array(), $submit_value);