webform_civicrm icon indicating copy to clipboard operation
webform_civicrm copied to clipboard

contact 1 email isn't always the billing email

Open MegaphoneJon opened this issue 1 year ago • 5 comments

Overview

See https://www.drupal.org/project/webform_civicrm/issues/3410941.

Before

Error when submitting a contribution and contact 1's email is blank.

After

Error when submitting a contribution when the contribution owner's email is blank.

MegaphoneJon avatar Dec 26 '23 22:12 MegaphoneJon

Note that this is basically #882 in a different place.

MegaphoneJon avatar Dec 26 '23 22:12 MegaphoneJon

@MegaphoneJon The test failure seems related

Error message Notice: Only variables should be passed by reference in Drupal\webform_civicrm\WebformCivicrmPostProcess->getContributionContactIndex() (line 1878 of /home/runner/work/webform_civicrm/webform_civicrm/src/WebformCivicrmPostProcess.php).

jitendrapurohit avatar Jan 07 '24 09:01 jitendrapurohit

I'm 99% sure that the current test failure is unrelated, since I'm not touching memberships.

With this updated fix, I can see the issue - not everywhere this function is called has $this->submissionValue defined. That's why this defaulted to contact 1 early in the postProcess.

MegaphoneJon avatar Mar 05 '24 22:03 MegaphoneJon

Yes - unrelated -> it's a leap year failure!

KarinG avatar Mar 05 '24 23:03 KarinG

That leap year issue has been dealt with. Kicking off the tests again!

KarinG avatar Mar 06 '24 01:03 KarinG