From 201bf4a6d0438dc0bd09877f0adb97af9225cf4b Mon Sep 17 00:00:00 2001 From: Lee Rowlands <lee.rowlands@previousnext.com.au> 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 abe4fb5ab4a6..9091d534465a 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 1fcba3e34d11..bb1b8ec319e7 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 7b292eb8305f..07e605d0315a 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 ffadad409c99..a107893eecda 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 @@ protected function assertEntity($id, $expected_label, array $expected_recipients 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 d34da7452086..f6c9b5815a76 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 b7b3f4b8f391..22ad70f44bd1 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 @@ public function testLanguageContentTaxonomy() { // 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 5d43fec42e6b..f259fe7e8d82 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 @@ public function testLanguageContentTaxonomy() { // 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 6a5e2b89a4a8..f4a3ec1355fc 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 d79ffcd59bd8..e9c811d1665c 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 a17fc4bd2dc5..7c14d3765b29 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 @@ public function testTaxonomyVocabulary() { $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 1d3dbfb9f5f8..8472dc29f06e 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 @@ public function testTaxonomyVocabularyTranslation() { $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 b051ce689f1c..d52cac69947f 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 @@ protected function assertHierarchy($vid, $tid, array $parent_ids) { * 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 3aae9a359385..714cdfd6dc3e 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 @@ public function testTaxonomyVocabulary() { $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); } } -- GitLab