diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php b/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php index f43e447..0702342 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php @@ -105,6 +105,10 @@ public function loadMultiple(EntityStorageInterface $storage, array $sub_ids = N } } } + else { + $fields = array_keys($migration->getSourcePlugin()->fields()); + $migration->process += array_combine($fields, $fields); + } $migrations[$migration->id()] = $migration; } catch (RequirementsException $e) { diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php index 807ee43..0155674 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php @@ -12,7 +12,6 @@ use Drupal\migrate\Plugin\SourceEntityInterface; use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; - /** * Drupal 6 profile fields values source. * diff --git a/core/modules/migrate_drupal/src/Tests/Dump/Drupal6Node.php b/core/modules/migrate_drupal/src/Tests/Dump/Drupal6Node.php index d8216f5..5d393d6 100644 --- a/core/modules/migrate_drupal/src/Tests/Dump/Drupal6Node.php +++ b/core/modules/migrate_drupal/src/Tests/Dump/Drupal6Node.php @@ -555,8 +555,20 @@ public function load() { 'field_test_integer_selectlist_value' => '3412', 'field_test_identical1_value' => 1, 'field_test_identical2_value' => 1, - 'field_test_link_url' => 'http://google.com', - 'field_test_link_title' => 'Google', + 'field_test_link_url' => 'http://drupal.org/project/drupal', + 'field_test_link_title' => 'Drupal project page', + 'field_test_link_attributes' => 's:6:"a:0:{}";', + )) + ->values(array( + 'nid' => 1, + 'vid' => 2, + 'uid' => 1, + 'field_test_three_value' => '42.42', + 'field_test_integer_selectlist_value' => '3412', + 'field_test_identical1_value' => 1, + 'field_test_identical2_value' => 1, + 'field_test_link_url' => 'http://drupal.org/project/drupal', + 'field_test_link_title' => 'Drupal project page', 'field_test_link_attributes' => 's:6:"a:0:{}";', )) ->values(array( @@ -571,6 +583,18 @@ public function load() { 'field_test_link_title' => 'Drupal Groups', 'field_test_link_attributes' => 's:6:"a:0:{}";', )) + ->values(array( + 'nid' => 2, + 'vid' => 5, + 'uid' => 1, + 'field_test_three_value' => '23.2', + 'field_test_integer_selectlist_value' => '1244', + 'field_test_identical1_value' => 1, + 'field_test_identical2_value' => 1, + 'field_test_link_url' => 'http://groups.drupal.org/', + 'field_test_link_title' => 'Drupal Groups', + 'field_test_link_attributes' => 's:6:"a:0:{}";', + )) ->execute(); $this->setModuleVersion('content', 6001); diff --git a/core/modules/migrate_drupal/src/Tests/Dump/Drupal6UserProfileFields.php b/core/modules/migrate_drupal/src/Tests/Dump/Drupal6UserProfileFields.php index 90a3762..0838354 100644 --- a/core/modules/migrate_drupal/src/Tests/Dump/Drupal6UserProfileFields.php +++ b/core/modules/migrate_drupal/src/Tests/Dump/Drupal6UserProfileFields.php @@ -203,7 +203,6 @@ public static function getData($table) { 'autocomplete' => '1', 'options' => '', ), -/* array( 'fid' => '13', 'title' => 'Your blog', @@ -219,7 +218,6 @@ public static function getData($table) { 'autocomplete' => '0', 'options' => '', ), -*/ array( 'fid' => '14', 'title' => 'Birthdate', diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php index cfc21c4..e7708b5 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php @@ -155,8 +155,8 @@ public function testCckFields() { $this->assertEqual($node->field_test_identical2->value, '1', 'Integer value is correct'); // Test that link fields are migrated. - $this->assertIdentical($node->field_test_link->url, 'http://google.com'); - $this->assertIdentical($node->field_test_link->title, 'Google'); + $this->assertIdentical($node->field_test_link->url, 'http://drupal.org/project/drupal'); + $this->assertIdentical($node->field_test_link->title, 'Drupal project page'); $this->assertIdentical($node->field_test_link->route_parameters, []); $this->assertIdentical($node->field_test_link->options, []);