Page MenuHomePhabricator

Recurring convert email failing due to donors email being on hold
Open, MediumPublic

Description

The recurring queue consumer failed today. Log file:/var/log/process-control/recurring_queue_consume/recurring_queue_consume-20260304-071001.log

The failure appears to be related to our inability to send to a donor's seemingly valid email address. The donor record is here, and the bounce record is on the activity tab.

Here's the error:

2026-03-04 07:10:16,562 ERROR   civicrm.wmf.INFO: Beginning DB transaction  
2026-03-04 07:10:16,618 ERROR   civicrm.wmf.INFO: wmf_civicrm: Converting to settlement currency: EUR -> USD {"old":"EUR","new":"USD"} 
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:356
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:359
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:362
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:365
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,651 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,652 ERROR   civicrm.wmf.INFO: thank_you: Calling ThankYou::render  
2026-03-04 07:10:16,652 ERROR   civicrm.wmf.INFO: Donor language unknown.  Defaulting to English... {"language":""} 
2026-03-04 07:10:16,659 ERROR   [PHP Deprecation] NumberFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/WorkflowMessage/MonthlyConve
rt.php:52
2026-03-04 07:10:16,706 ERROR   civicrm.wmf.INFO: thank_you: Done ThankYou::render  
2026-03-04 07:10:16,709 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:356
2026-03-04 07:10:16,710 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:359
2026-03-04 07:10:16,710 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,710 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,710 ERROR   [PHP Warning] Undefined array key "recipient_address" at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:199
2026-03-04 07:10:16,710 ERROR   civicrm.wmf.WARNING: Failed to create civimail record for TY message to   
2026-03-04 07:10:16,712 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:356
2026-03-04 07:10:16,712 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:359
2026-03-04 07:10:16,712 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,712 ERROR   [PHP Warning] Trying to access array offset on value of type null at /srv/org.wikimedia.civicrm/ext/wmf-thankyou/Civi/Api4/Action/ThankYou/Send.php:370
2026-03-04 07:10:16,712 ERROR   civicrm.wmf.ERROR: thank_you: Sending thank you message failed with CRM_Core_Exception exception for contribution: array{"amount":5.0,"contact_id":54782511,"currency":"EUR","receive_date":"202604040
70413","day_of_month":"4","recurring":true,"transaction_id":"CNTCT-54782511","contribution_id":140008889} array{"html":"","subject":""} no valid email {"params":{"amount":5.0,"contact_id":54782511,"currency":"EUR","receive_date":"
20260404070413","day_of_month":"4","recurring":true,"transaction_id":"CNTCT-54782511","contribution_id":140008889},"debug":{"html":"","subject":""},"exception_type":"CRM_Core_Exception","error_message":"no valid email"} 
2026-03-04 07:10:16,712 ERROR   civicrm.wmf.INFO: wmf_common: Aborting DB transaction.  
2026-03-04 07:10:16,756 ERROR   civicrm.wmf.ALERT: UNHANDLED ERROR. Message was removed from queue `recurring` and sent to the damaged message queue {"message":"UNHANDLED EXCEPTION SENDING THANK YOU MESSAGE

Event Timeline

This was due to it being a monthly convert and the exception not being caught when an email address was on hold. I talked to @Lars about how we can just move it to its own workflow send T419199: Move recurring convert email to new workflow send

hah there were two of these phabs!

hah there were two of these phabs!

There are not two of these phabs, the older ones were slightly different and might be fixed now?
T387449: EMAIL_SYSTEM_FAILURE UNHANDLED EXCEPTION SENDING THANK YOU MESSAGE
T400309: WMFDonor updates in WMF Thank you are unexpected

Cstone renamed this task from UNHANDLED EXCEPTION SENDING THANK YOU MESSAGE to Monthly convert email failing due to donors email being on hold.Mar 6 2026, 4:35 AM

Change #1248682 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/crm@master] Handle recurring convert email send on invalid email address

https://gerrit.wikimedia.org/r/1248682

Cstone renamed this task from Monthly convert email failing due to donors email being on hold to Recurring convert email failing due to donors email being on hold.Mar 6 2026, 5:26 AM

Change #1248682 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Handle recurring convert email send on invalid email address

https://gerrit.wikimedia.org/r/1248682

Change #1249369 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] WIP better TY mail handling for on-hold emails

https://gerrit.wikimedia.org/r/1249369

AKanji-WMF triaged this task as Medium priority.Mon, Mar 16, 8:24 PM

We can move the email sending to coworker and get it to stop blocking the recurring modify queue