summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-10-09 16:37:26 (GMT)
committerNathaniel Catchpole2017-10-09 16:37:26 (GMT)
commit50caae081da3f94e1390a5373b59d3d84ae4f743 (patch)
treef368f6e65d4c7f8967aeba1b0ed3a1e1b6047158
parent7d63b2a2454c9e396e2da4f7ad6af8995c47e1c6 (diff)
Issue #2914649 by masipila, dipakmdhrm, phenaproxima, maxocub: [D7] Vocabulary migration: vid incorrectly mapped from vocabulary name instead of machine_name
-rw-r--r--core/modules/migrate_drupal/tests/fixtures/drupal7.php2
-rw-r--r--core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml4
-rw-r--r--core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php2
3 files changed, 3 insertions, 5 deletions
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
index 4b6dae1..aa5d1a6 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal7.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
@@ -45383,7 +45383,7 @@ $connection->insert('taxonomy_vocabulary')
))
->values(array(
'vid' => '4',
- 'name' => 'vocabulary name much longer than thirty two characters',
+ 'name' => 'vocabulary name clearly different than machine name and much longer than thirty two characters',
'machine_name' => 'vocabulary_name_much_longer_than_thirty_two_characters',
'description' => 'description of vocabulary name much longer than thirty two characters',
'hierarchy' => '1',
diff --git a/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml b/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml
index 3c41e98..751f018 100644
--- a/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml
+++ b/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml
@@ -7,10 +7,8 @@ source:
process:
vid:
-
- plugin: machine_name
- source: name
- -
plugin: make_unique_entity_field
+ source: machine_name
entity_type: taxonomy_vocabulary
field: vid
length: 32
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
index 78a00a5..5663ea6 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
@@ -57,7 +57,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal7TestBase {
$this->assertEntity('tags', 'Tags', 'Use tags to group articles on similar topics into categories.', VocabularyInterface::HIERARCHY_DISABLED, 0);
$this->assertEntity('forums', 'Sujet de discussion', 'Forum navigation vocabulary', VocabularyInterface::HIERARCHY_SINGLE, -10);
$this->assertEntity('test_vocabulary', 'Test Vocabulary', 'This is the vocabulary description', VocabularyInterface::HIERARCHY_SINGLE, 0);
- $this->assertEntity('vocabulary_name_much_longer_than', 'vocabulary name much longer than thirty two characters', 'description of vocabulary name much longer than thirty two characters', VocabularyInterface::HIERARCHY_SINGLE, 0);
+ $this->assertEntity('vocabulary_name_much_longer_than', 'vocabulary name clearly different than machine name and much longer than thirty two characters', 'description of vocabulary name much longer than thirty two characters', VocabularyInterface::HIERARCHY_SINGLE, 0);
}
}