X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Fmigration_templates%2Fd6_vocabulary_field.yml;h=893a95d33a96d76fd2691023349f522585ea113d;hb=refs%2Fheads%2Ft2;hp=082386fdffa6480412bdd4d10be3203642d1d913;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml b/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml index 082386fdf..893a95d33 100644 --- a/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml +++ b/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml @@ -8,10 +8,12 @@ source: entity_type: node type: entity_reference target_entity_type: taxonomy_term + field_prefix: field_ process: entity_type: 'constants/entity_type' type: 'constants/type' - field_name: + # This value is only used in the 'field_name' process pipeline below. + raw_field_name: - plugin: migration_lookup migration: d6_taxonomy_vocabulary @@ -19,6 +21,23 @@ process: - plugin: skip_on_empty method: row + field_name: + # Prepend field_ to avoid conflicts with base fields, and make sure the + # result is no longer than 32 characters. + - + plugin: concat + source: + - constants/field_prefix + - '@raw_field_name' + - + plugin: substr + length: 32 + - + # This plugin checks if the vocabulary being migrated is the one used by + # Forum. If so, we use the machine name that Forum expects. Otherwise, we + # leave it unchanged. + plugin: forum_vocabulary + machine_name: taxonomy_forums 'settings/target_type': 'constants/target_entity_type' cardinality: cardinality destination: