After running d7_metatag_field_migration through Drush, the migrate:status command indicates a disconnect between the number of items that were to be migrated versus how many actually were. For example:

  Import from Drupal 7   upgrade_d7_metatag_field_in   Idle     2        13         -11           2020-07-11 21:28:51  
  (migrate_drupal_7)     stance                                                                                        

In this scenario it identified that two instances needed to be created but ended up creating thirteen.

Comments

DamienMcKenna created an issue. See original summary.

huzooka’s picture

Assigned: Unassigned » huzooka

This happens because the count() method that \Drupal\metatag\Plugin\migrate\source\d7\MetatagFieldInstance inherits operates with the query. But MetatagFieldInstance::initializeIterator() (usually) creates more rows than the result of the query.

huzooka’s picture

Title: migrate:status shows incorrect number of field instance migrations » Metatag field instance migration source plugins report incorrect number of items
Assigned: huzooka » Unassigned
Status: Active » Needs review
StatusFileSize
new1.32 KB
new2.32 KB

Updated the source plugin's tests.

The last submitted patch, 3: metatag-field_instance_migration_source_plugins_report_incorrect_count-3158613-3--test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

The last submitted patch, 5: metatag-field_instance_migration_source_plugins_report_incorrect_count-3158613-5--test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

wim leers’s picture

LGTM! 👍

damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #3129597: Plan for Metatag 8.x-1.14

Thanks. Committed.

Status: Fixed » Closed (fixed)

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