In discussion with @AKanji-WMF & @Ejegg today we decided to get the dedupe script to re-run though the entire database as it is able to clean up a lot of duplicates that it missed on previous runs as our conflict handling has improved over time. I'm seeing between 1% & 20% on blocks of contacts (I'm sure it varies a lot depending on which blocks are being tackled).
However, after enabling we started to get fail mail. These fail mails occur when specific contact pairs are attempted. As an interim fix @Ejegg has slowed down the rate of this job so it doesn't annoy us too much until we resolve it.
The error is a type hint & would be easily solved by changing / handling that although ideally we would capture the scenario in a unit test & prevent any recurrence
I can reliably replicate the error on staging with this pair
drush @wmff cvapi Contact.merge to_keep_id=135090 to_remove_id=299459 mode=safe debug=1
TypeError: Argument 2 passed to [error]
CRM_Deduper_BAO_Resolver_PreferredContactLocationResolver::isReHomingRequired() must be of the type array, null
given, called in
/srv/org.wikimedia.civicrm/drupal/sites/default/civicrm/extensions/deduper/CRM/Deduper/BAO/Resolver/PreferredContactLocationResolver.php
on line 126 in CRM_Deduper_BAO_Resolver_PreferredContactLocationResolver->isReHomingRequired() (line 42 of
/srv/org.wikimedia.civicrm/drupal/sites/default/civicrm/extensions/deduper/CRM/Deduper/BAO/Resolver/PreferredContactLocationResolver.php).
Cannot modify header information - headers already sent by (output started at [warning]
/srv/org.wikimedia.civicrm/drupal/sites/default/civicrm/extensions/deduper/CRM/Deduper/BAO/Resolver/PreferredContactLocationResolver.php:122)
bootstrap.inc:1551
TypeError: Argument 2 passed to CRM_Deduper_BAO_Resolver_PreferredContactLocationResolver::isReHomingRequired() must be of the type array, null given, called in /srv/org.wikimedia.civicrm/drupal/sites/default/civicrm/extensions/deduper/CRM/Deduper/BAO/Resolver/PreferredContactLocationResolver.php on line 126 in CRM_Deduper_BAO_Resolver_PreferredContactLocationResolver->isReHomingRequired() (line 42 of /srv/org.wikimedia.civicrm/drupal/sites/default/civicrm/extensions/deduper/CRM/Deduper/BAO/Resolver/PreferredContactLocationResolver.php).