diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php index d0b480b..0090c9a 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php @@ -54,11 +54,14 @@ public function prepareRow(Row $row) { // Select the list values from the profile_values table to ensure we get // them all since they can get out of sync with profile_fields. $options = $this->getDatabase()->query('SELECT DISTINCT value FROM {profile_values} WHERE fid = :fid', array(':fid' => $row->getSourceProperty('fid')))->fetchCol(); + // array_merge() takes care of any duplicates options. $options = array_merge($current_options, $options); $row->setSourceProperty('options', array_combine($options, $options)); } if ($row->getSourceProperty('type') == 'checkbox') { + // D6 profile checkboxes values are always 0 or 1 (with no labels), so we need to create two + // label-less options that will get 0 and 1 for their keys. $row->setSourceProperty('options', array(NULL, NULL)); }