我正在尝试将附加到 field_collection 实体类型(Drupal 7)的分类参考字段迁移到附加到段落实体类型(Drupal 8.6)的实体参考字段中。
虽然这似乎是迁移时要做的基本任务之一,但我找不到如何做的明确参考。
id: d7_field_collection_field_name
label: My Field name
migration_tags:
- Drupal 7
migration_group: migrate_drupal_7
source:
plugin: d7_custom_source_plugin
process:
field_title:
plugin: get
source: field_title
field_job_category:
plugin: get
source: field_job_category
destination:
plugin: 'entity_reference_revisions:paragraph'
default_bundle: my_paragraphs_bundle
migration_dependencies:
required:
- upgrade_d7_field
- upgrade_d7_node_type
- upgrade_d7_field_collection_type
- upgrade_d7_field_instance
此处解释了迁移过程:https ://www.mtech-llc.com/blog/ada-hernandez/migration-field-collection-d7-paragraphs-node-d8
因此, field_job_category 不起作用。我在进程插件中尝试了很多方法,但没有运气。例如我用过:
field_job_category:
plugin: migration_lookup
migration: upgrade_d7_taxonomy_term_job_categories
source: term_id
然后尝试使用源,因为我使用的是 Drupal 8.6
field_job_category:
plugin: migration_lookup
migration: upgrade_d7_taxonomy_term_job_categories
sources:
upgrade_d7_taxonomy_term_job_categories:
- term_id
我相信它是 field_job_category 下的配置错误,但我还无法弄清楚。
非常感谢您的帮助!