X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Fmigration_templates%2Fd6_vocabulary_field_instance.yml;fp=web%2Fcore%2Fmodules%2Ftaxonomy%2Fmigration_templates%2Fd6_vocabulary_field_instance.yml;h=7e28377866c311481e0e948437d876baebe4fc57;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=6fe5eed0175cb6d350c501aadd18bb22ad1e2d3e;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml b/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml index 6fe5eed01..7e2837786 100644 --- a/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml +++ b/web/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml @@ -8,6 +8,7 @@ source: entity_type: node auto_create: true selection_handler: 'default:taxonomy_term' + field_prefix: field_ process: entity_type: 'constants/entity_type' bundle: @@ -18,7 +19,8 @@ process: - plugin: skip_on_empty method: row - field_name: + # This value is only used in the 'field_name' process pipeline below. + raw_field_name: - plugin: migration_lookup migration: d6_taxonomy_vocabulary @@ -26,6 +28,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 label: name 'settings/handler': 'constants/selection_handler' 'settings/handler_settings/target_bundles/0': '@field_name'