Problem/Motivation
Right now, RollbackableTrait::import() marks every component as new if they were new before the actual import was executed.
This is wrong for e.g. field formatter settings, because the component might be new (missing) from the actual entity view display even after the migration; because its formatter in Drupal 7 was set to hidden.
Proposed resolution
Before marking a component as new, we should check whether it isn't new after the import. If it is still new, then the destination plugin shouldn't flag it as being new.
Remaining tasks
- ✅
Failing test-only patch.
- ✅
Fix.
- ✅
Commit to 1.1.x
- ✅
Cherry-pick to 1.0.x
- ✅
Update documentation.
API changes
No more harmful (and meaningless) exceptions.
Comments
Comment #2
huzookaThis should be get into 1.0.x as well.
Comment #3
huzookaEdit: #3227391: d7_field_formatter_settings should migrate the default view mode to default not full is only slightly related to this.
Comment #4
huzookaComment #5
huzookaComment #6
huzookaComment #9
huzooka(Soft?)blocked by #3227549: Sql id map plugin's getRowByDestination shouldn't return FALSE.
Comment #10
huzooka...and an another one: #3227660: MigrateExecutable::rollback incorrectly assumes MigrateMapInterface::getRowByDestination() returns an array with 'rollback_action' key.
Comment #11
huzookaHopefully #3227668: Add workarounds for core issues 3227549 and 3227660 can help MigMAg,but it will also mean that either:
Comment #12
huzookaComment #13
huzookaComment #14
huzookaComment #16
huzookaPatches in #13 and #14 are identical, unfortunately.
Comment #17
huzookaComment #20
huzookaComment #22
huzookaComment #23
huzookaComment #24
huzooka