Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / taxonomy / migration_templates / d6_vocabulary_entity_form_display.yml
index 4ac6d646bca500289aa79ae8d728563b82084a63..abd31911c1aea0acaef93becfb3c6237bdfd5429 100644 (file)
@@ -9,6 +9,7 @@ source:
     form_mode: default
     options:
       weight: 20
+    field_prefix: field_
 process:
   entity_type: 'constants/entity_type'
   form_mode: 'constants/form_mode'
@@ -27,10 +28,32 @@ process:
     -
       plugin: skip_on_empty
       method: row
+  # This value is only used in the 'field_name' process pipeline below.
+  raw_field_name:
+    -
+      plugin: migration_lookup
+      migration: d6_taxonomy_vocabulary
+      source: vid
+    -
+      plugin: skip_on_empty
+      method: row
   field_name:
-    plugin: migration_lookup
-    migration: d6_taxonomy_vocabulary
-    source: vid
+    # 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
 destination:
   plugin: component_entity_form_display
 migration_dependencies: