Skip to content
Snippets Groups Projects
Commit 013669a2 authored by catch's avatar catch
Browse files

Issue #2091523 by yched, pfrenssen: Fixed Install in foreign language fails...

Issue #2091523 by yched, pfrenssen: Fixed Install in foreign language fails with integrity constraint violation on user_picture_target_id.
parent 683b300a
No related branches found
No related tags found
No related merge requests found
......@@ -653,11 +653,9 @@ 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);
$items->filterEmptyValues();
foreach ($items as $delta => $item) {
// We now know we have someting to insert.
$do_insert = TRUE;
......@@ -670,9 +668,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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment