From 201bf4a6d0438dc0bd09877f0adb97af9225cf4b Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Wed, 11 Sep 2019 19:35:39 +1000 Subject: [PATCH] Issue #3046397 by quietone: Change length in make_unique_entity_field to less than 32 --- core/modules/block/migrations/d6_block.yml | 2 +- .../migrations/d6_taxonomy_vocabulary_translation.yml | 2 +- core/modules/contact/migrations/contact_category.yml | 2 +- .../tests/src/Kernel/Migrate/MigrateContactCategoryTest.php | 2 +- core/modules/image/migrations/d6_imagecache_presets.yml | 2 +- .../MigrateLanguageContentTaxonomyVocabularySettingsTest.php | 2 +- .../MigrateLanguageContentTaxonomyVocabularySettingsTest.php | 2 +- core/modules/taxonomy/migrations/d6_taxonomy_vocabulary.yml | 2 +- core/modules/taxonomy/migrations/d7_taxonomy_vocabulary.yml | 2 +- .../src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php | 2 +- .../Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php | 2 +- .../Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php | 4 ++-- .../src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core/modules/block/migrations/d6_block.yml b/core/modules/block/migrations/d6_block.yml index abe4fb5ab4a..9091d534465 100644 --- a/core/modules/block/migrations/d6_block.yml +++ b/core/modules/block/migrations/d6_block.yml @@ -19,7 +19,7 @@ process: entity_type: block field: id postfix: _ - length: 32 + length: 29 source: module plugin: - diff --git a/core/modules/config_translation/migrations/d6_taxonomy_vocabulary_translation.yml b/core/modules/config_translation/migrations/d6_taxonomy_vocabulary_translation.yml index 1fcba3e34d1..bb1b8ec319e 100644 --- a/core/modules/config_translation/migrations/d6_taxonomy_vocabulary_translation.yml +++ b/core/modules/config_translation/migrations/d6_taxonomy_vocabulary_translation.yml @@ -13,7 +13,7 @@ process: source: name - plugin: substr - length: 32 + length: 30 langcode: language property: plugin: static_map diff --git a/core/modules/contact/migrations/contact_category.yml b/core/modules/contact/migrations/contact_category.yml index 7b292eb8305..07e605d0315 100644 --- a/core/modules/contact/migrations/contact_category.yml +++ b/core/modules/contact/migrations/contact_category.yml @@ -15,7 +15,7 @@ process: plugin: make_unique_entity_field entity_type: contact_form field: id - length: 32 + length: 30 label: category recipients: recipients reply: reply diff --git a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php index ffadad409c9..a107893eecd 100644 --- a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php +++ b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php @@ -58,7 +58,7 @@ class MigrateContactCategoryTest extends MigrateDrupal6TestBase { public function testContactCategory() { $this->assertEntity('website_feedback', 'Website feedback', ['admin@example.com'], '', 0); $this->assertEntity('some_other_category', 'Some other category', ['test@example.com'], 'Thanks for contacting us, we will reply ASAP!', 1); - $this->assertEntity('a_category_much_longer_than_thir', 'A category much longer than thirty two characters', ['fortyninechars@example.com'], '', 2); + $this->assertEntity('a_category_much_longer_than_th', 'A category much longer than thirty two characters', ['fortyninechars@example.com'], '', 2); // Test there are no duplicated roles. $contact_forms = [ diff --git a/core/modules/image/migrations/d6_imagecache_presets.yml b/core/modules/image/migrations/d6_imagecache_presets.yml index d34da745208..f6c9b5815a7 100644 --- a/core/modules/image/migrations/d6_imagecache_presets.yml +++ b/core/modules/image/migrations/d6_imagecache_presets.yml @@ -14,7 +14,7 @@ process: plugin: make_unique_entity_field entity_type: image_style field: name - length: 32 + length: 30 label: presetname effects: plugin: d6_imagecache_actions diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php index b7b3f4b8f39..22ad70f44bd 100644 --- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php @@ -47,7 +47,7 @@ class MigrateLanguageContentTaxonomyVocabularySettingsTest extends MigrateDrupal // Localize terms. $this->assertLanguageContentSettings($target_entity, 'vocabulary_3_i_2_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => FALSE]); // None translation enabled. - $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_than', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => TRUE]); + $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_th', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => TRUE]); $this->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'forums', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'type', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php index 5d43fec42e6..f259fe7e8d8 100644 --- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php @@ -44,7 +44,7 @@ class MigrateLanguageContentTaxonomyVocabularySettingsTest extends MigrateDrupal // No multilingual options for terms, i18n_mode = 0. $this->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'forums', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]); - $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_than', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]); + $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_th', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'test_vocabulary', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]); // Localize, i18n_mode = 1. $this->assertLanguageContentSettings($target_entity, 'vocablocalized', LanguageInterface::LANGCODE_NOT_SPECIFIED, TRUE, ['enabled' => TRUE]); diff --git a/core/modules/taxonomy/migrations/d6_taxonomy_vocabulary.yml b/core/modules/taxonomy/migrations/d6_taxonomy_vocabulary.yml index 6a5e2b89a4a..f4a3ec1355f 100644 --- a/core/modules/taxonomy/migrations/d6_taxonomy_vocabulary.yml +++ b/core/modules/taxonomy/migrations/d6_taxonomy_vocabulary.yml @@ -14,7 +14,7 @@ process: plugin: make_unique_entity_field entity_type: taxonomy_vocabulary field: vid - length: 32 + length: 30 migrated: true - # This plugin checks if the vocabulary being migrated is the one used by diff --git a/core/modules/taxonomy/migrations/d7_taxonomy_vocabulary.yml b/core/modules/taxonomy/migrations/d7_taxonomy_vocabulary.yml index d79ffcd59bd..e9c811d1665 100644 --- a/core/modules/taxonomy/migrations/d7_taxonomy_vocabulary.yml +++ b/core/modules/taxonomy/migrations/d7_taxonomy_vocabulary.yml @@ -12,7 +12,7 @@ process: source: machine_name entity_type: taxonomy_vocabulary field: vid - length: 32 + length: 30 migrated: true - # This plugin checks if the vocabulary being migrated is the one used by diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php index a17fc4bd2dc..7c14d3765b2 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php @@ -37,7 +37,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal6TestBase { $this->assertSame("description of vocabulary $j (i=$i)", $vocabulary->getDescription()); $this->assertSame(4 + $i, $vocabulary->get('weight')); } - $vocabulary = Vocabulary::load('vocabulary_name_much_longer_than'); + $vocabulary = Vocabulary::load('vocabulary_name_much_longer_th'); $this->assertSame('vocabulary name much longer than thirty two characters', $vocabulary->label()); $this->assertSame('description of vocabulary name much longer than thirty two characters', $vocabulary->getDescription()); $this->assertSame(7, $vocabulary->get('weight')); diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php index 1d3dbfb9f5f..8472dc29f06 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php @@ -46,7 +46,7 @@ class MigrateTaxonomyVocabularyTranslationTest extends MigrateDrupal6TestBase { $this->assertSame('fr - vocabulary 2 (i=1)', $config->get('name')); $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_3_i_2_'); $this->assertSame('fr - vocabulary 3 (i=2)', $config->get('name')); - $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_name_much_longer_than'); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_name_much_longer_th'); $this->assertSame('Nom de vocabulaire beaucoup plus long que trente-deux caractères', $config->get('name')); $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.tags'); $this->assertSame('fr - Tags', $config->get('name')); diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php index b051ce689f1..d52cac69947 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php @@ -116,8 +116,8 @@ class MigrateTermLocalizedTranslationTest extends MigrateDrupal6TestBase { * Tests the Drupal 6 i18n localized taxonomy term to Drupal 8 migration. */ public function testTranslatedLocalizedTaxonomyTerms() { - $this->assertEntity(14, 'en', 'Talos IV', 'vocabulary_name_much_longer_than', 'The home of Captain Christopher Pike.', NULL, '0', []); - $this->assertEntity(15, 'en', 'Vulcan', 'vocabulary_name_much_longer_than', NULL, NULL, '0', []); + $this->assertEntity(14, 'en', 'Talos IV', 'vocabulary_name_much_longer_th', 'The home of Captain Christopher Pike.', NULL, '0', []); + $this->assertEntity(15, 'en', 'Vulcan', 'vocabulary_name_much_longer_th', NULL, NULL, '0', []); /** @var \Drupal\taxonomy\TermInterface $entity */ $entity = Term::load(14); 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 3aae9a35938..714cdfd6dc3 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php @@ -54,7 +54,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal7TestBase { $this->assertEntity('tags', 'Tags', 'Use tags to group articles on similar topics into categories.', 0); $this->assertEntity('forums', 'Sujet de discussion', 'Forum navigation vocabulary', -10); $this->assertEntity('test_vocabulary', 'Test Vocabulary', 'This is the vocabulary description', 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', 0); + $this->assertEntity('vocabulary_name_much_longer_th', 'vocabulary name clearly different than machine name and much longer than thirty two characters', 'description of vocabulary name much longer than thirty two characters', 0); } }