From cf11cdf2da3f997cdf31c3f71228a1444fbe90ba Mon Sep 17 00:00:00 2001 From: Jacob Sanford Date: Thu, 11 Jul 2024 16:05:58 -0300 Subject: [PATCH] LOYALIST-58 Move to body_value --- ...rate_plus.migration.0_loyalist_migrate_loyalist_items.yml | 5 ++++- .../src/Plugin/migrate/source/LoyalistItem.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/custom/modules/loyalist_migrate/config/install/migrate_plus.migration.0_loyalist_migrate_loyalist_items.yml b/custom/modules/loyalist_migrate/config/install/migrate_plus.migration.0_loyalist_migrate_loyalist_items.yml index 008f98f..1eeb689 100644 --- a/custom/modules/loyalist_migrate/config/install/migrate_plus.migration.0_loyalist_migrate_loyalist_items.yml +++ b/custom/modules/loyalist_migrate/config/install/migrate_plus.migration.0_loyalist_migrate_loyalist_items.yml @@ -47,12 +47,15 @@ process: body: - plugin: sub_process - source: body + source: body_value process: value: value format: plugin: default_value default_value: wysiwyg + summary: + plugin: default_value + default_value: '' destination: plugin: 'entity:node' diff --git a/custom/modules/loyalist_migrate/src/Plugin/migrate/source/LoyalistItem.php b/custom/modules/loyalist_migrate/src/Plugin/migrate/source/LoyalistItem.php index f3a968d..131db6f 100644 --- a/custom/modules/loyalist_migrate/src/Plugin/migrate/source/LoyalistItem.php +++ b/custom/modules/loyalist_migrate/src/Plugin/migrate/source/LoyalistItem.php @@ -27,7 +27,7 @@ public function query() $query->addField('n', 'title', 'title'); $query->leftJoin('field_data_body', 'fbody', 'n.nid = fbody.entity_id AND fbody.deleted = 0'); - $query->addField('fbody', 'body_value', 'body'); + $query->addField('fbody', 'body_value', 'body_value'); $query->leftJoin('field_data_field_accompanying_record', 'fac', 'n.nid = fac.entity_id AND fac.deleted = 0'); $query->addField('fac', 'field_accompanying_record_value', 'field_accompanying_record_value'); @@ -62,7 +62,7 @@ public function fields() 'issuing_body_name' => 'issuing_body_name', 'subject_heading_name' => 'subject_heading_name', 'field_other_numbers_value' => 'field_other_numbers_value', - 'body' => 'body', + 'body_value' => 'body_value', ]; return $fields; }