1.0 Problem/Motivation
I have a webform set up to create a Contact, add a Membership, and create a Contribution/take the Payment. It creates the Contact correctly, but does not create either the Membership or the Contribution.
The problem appears to be related to failing to carry the membership_type_id forward from the first to the second page of the form properly.
2.0 Detailed steps to reproduce (embed screenshots)
Running Drupal 8.9.13; Webform 6.0.1; Webform_Civicrm downloaded from Github 8.x-5.x on 7/2/21.
Dump of the Webform attached.
Complete the form using Dummy Card Processor (others behave similarly).
3.0 Further observations
When entering the second page the correct Membership price is shown in the Payment Amount field. This can be seen in the return value from $this->tallyLineItems() about Line 134 of validate() in WebformCivicrmPostProcess.php.
When Submitting the second page $this->tallyLineItems() returns zero, and therefore it does not go on to create the payment. tallyLineItems() returns zero because it is not passed a membership_type_id. Attachment MembershipPage2 shows the content of $this->data in tallyLineItems() at around line 1655. Compare to attachment MembershipPage1 which was taken when pressing Next on the first page.
The process processMemberships() can also be seen to exit because it has no membership_type_id at around line 1196.
Fixed
5.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.