Problem/Motivation

During migration from D7 to D9 after a bean field is processed, all subsequent fields get entity type of block_content.

Steps to reproduce

Run a migration including bean and other custom content type fields, with bean fields not being processed last.

I think setting process to default_value of block_content persists despite the original field's entity type not being 'bean'

Comments

gbotis created an issue. See original summary.

huzooka’s picture

Assigned: Unassigned » huzooka

You're absolutely right, and the report is appropriately detailed and classified.

gbotis’s picture

Replacing

$migration->setProcessOfProperty($destination_property, [
  'plugin' => 'default_value',
  'default_value' => 'block_content',
]);

with

$migration->mergeProcessOfProperty($destination_property, [
  'bean_migrate' => [
    'plugin' => 'static_map',
      'map' => [
        'bean' => 'block_content'
      ],
    'bypass' => 'true',
  ]
]);

works fine
Same problem exists with 'bundle' but in that case a more complex solution is needed.

huzooka’s picture

Assigned: huzooka » Unassigned
Status: Active » Needs review
StatusFileSize
new19.18 KB

I think this solves the bug.

huzooka’s picture

I'm trying to add some functional (regression) test coverage.

huzooka’s picture

Title: Fields get wrong entity type of block_content » Migrated field configurations and view modes get wrong entity type of block_content

  • huzooka committed 8d16981 on 1.0.x
    Issue #3205133 by huzooka, gbotis: Migrated field configurations and...
huzooka’s picture

Status: Needs review » Fixed

Just now tagged 1.0.0-beta3, it will be released in minutes.

@gbotis, Thank you!

huzooka’s picture

Version: 1.0.0-beta2 » 1.0.x-dev
wim leers’s picture

Woah, super fast report-and-fix cycle here! 🤩👏

Nice teamwork here, @gbotis & @huzooka!

gbotis’s picture

I updated to the latest version and tested. Everything seems to work as expected. Thank you huzooka!

wim leers’s picture

🥳

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.