I'm trying to write a D8 migrations files but the following one isn't working on the source 'body/value' because it resolves to a null value instead of the intended string.

id: my_d7_node_news
label: 'Nodes (News)'
langcode: en
status: true
dependencies: {  }
class: Drupal\migrate\Plugin\Migration
field_plugin_method: null
cck_plugin_method: null
  - 'Drupal 7'
  plugin: d7_node
  node_type: news
  nid: tnid
  vid: vid
  title: title
  uid: node_uid
  status: status
  created: created
  changed: changed
  revision_uid: revision_uid
  revision_log: log
  revision_timestamp: timestamp
    plugin: get
    source: 'body/value'
    plugin: default_value
    default_value: some summary
    plugin: default_value
    default_value: rich_text
  plugin: 'entity:node'
  default_bundle: news

I tried multiple writing for the source: 'body/value' (e,g: source: body_value, etc, ...) with no luck...

Which syntax should I use to make successful mapping on body/value: body/value using the d7_node source plugin?


Something like this:

    plugin: iterator
    source: body
      value: value
        plugin: default_value
        default_value: filtered_html
  • This has been renamed to the sub_process plugin. – Cameron Jun 4 '19 at 0:20

Just use 'body', as in:

body: body

That is what core d7_node migration does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.