Issue #2091523 by yched, pfrenssen: Fixed Install in foreign language fails with integrity constraint violation on user_picture_target_id.
parent
683b300a7d
commit
013669a29d
|
@ -653,11 +653,9 @@ class DatabaseStorageController extends FieldableEntityStorageControllerBase {
|
|||
|
||||
$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);
|
||||
$items->filterEmptyValues();
|
||||
foreach ($items as $delta => $item) {
|
||||
// We now know we have someting to insert.
|
||||
$do_insert = TRUE;
|
||||
|
@ -670,9 +668,8 @@ class DatabaseStorageController extends FieldableEntityStorageControllerBase {
|
|||
);
|
||||
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);
|
||||
|
|
|
@ -98,8 +98,8 @@ class InstallerTranslationTest extends InstallerTest {
|
|||
// 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);
|
||||
|
|
Loading…
Reference in New Issue