User data submission not changed when using --update during a migration

Created on 25 October 2023, about 1 year ago

Problem/Motivation

The problem is not with the code in this module but elsewhere but people are going to start their search for solution here.
In .../core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php:314 it has this code in protected function updateEntity(EntityInterface $entity, Row $row)

foreach ($row->getDestination() as $field_name => $values) {
  $field = $entity->$field_name;
  if ($field instanceof TypedDataInterface) {
    $field->setValue($values);
  }
}

The issue is that the field data is not an instance of TypeDataInterface.
data has the user submitted information.

The simplest work around is to rollback the webform_submissions migration and then import them all again.

Steps to reproduce

Change the user entered data on a previously migrated submission and run
`drush migrate:import --update migration_name`

Proposed resolution

Work with the webform and core teams to provide a solution?

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom somersoft

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024