CiviMail doesn't send to full recipient list with merge of REST API wrapper code
With these changes https://github.com/civicrm/civicrm-wordpress/pull/160 and the filter in place a mailing that was intended for 1605 recipients stopped sending at 399 recipients. Typically a mailing of this size would complete in 5-7 minutes. This is using Sparkpost 1.3.
The mailing status was stuck in running and did not change after a new cron run time 15 min later. When we tried to manually execute the Send Scheduled Mailings job that resulted in this error from WP debugging:
Notice: Undefined index: html in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109Fatal error: Uncaught TypeError: Argument 1 passed to CiviCRM_WP_REST\Civi\Mailing_Hooks::is_mail_tracking_url_alterable() must be of the type string, null given, called in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109 and defined in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php:191 Stack trace: #0 /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php(109): CiviCRM_WP_REST\Civi\Mailing_Hooks->is_mail_tracking_url_alterable(NULL) #1 /var/www/lporg/wp-includes/class-wp-hook.php(287): CiviCRM_WP_REST\Civi\Mailing_Hooks->do_mailing_urls(Array, 'civimail') #2 /var/www/lporg/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #3 /var/www/lporg/wp-includes/plugin.php(544): WP_Hook->do_action(Array) #4 /var/www/lporg/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php(108): do_action_ref_array('civicrm_alterMa...', Array) #5 /var/www/lporg/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(90): CRM_ in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 19
We removed the filter and executed the scheduled job and the mailing started again and finished successfully.
Ref: #47 (closed)