Trying to migrate any migrations that depend on "upgrade_d7_field_instance" will fail if in the original database duplicate combined field_name entries ('entity', 'bundle', 'field_name') exist.
For us, we tried migrating "upgrade_d7_field_instance_widget_settings" after migrating "upgrade_d7_field_instance". The following error appeared, after trying to migrate:
[error] Migration upgrade_d7_field_instance_widget_settings did not meet the requirements. Missing migrations upgrade_d7_field_instance. requirements: upgrade_d7_field_instance.
After a bit of debugging, we found out, that the migration fails inside the health check for upgrade_d7_field_instance inside "Drupal\migrate\Plugin\Migration.php" "allRowsProcessed()". The problem: The source count is higher, then the processed count, thus failing.
// Output: "182|181"
var_dump($source_count . '|' . $processed_count);
After digging inside D7's "field_config_instance" db table and comparing it to the "migrate_map_upgrade_d7_field_instance" migration mapping table, we found a duplicate combined field_name entry ('entity', 'bundle', 'field_name').
After deleting the older entry, the migration worked as expected again.
Drupal 7 allows duplicate combined field_name_bundle entries, because of a faulty index setting:
The "field_name_bundle" key instead should be unique and add the "delete" row to be correct.
Throw a more meaningful error like, [error] Migration upgrade_d7_field_instance_widget_settings did not meet the requirements. Migration upgrade_d7_field_instance has duplicate field_name_bundle entries, please delete the duplicate entries
or something along those lines.
Active
11.0 π₯
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.