Unreleased regression: Membership selction fails validation
Overview
A Contribution page that includes a Membership selection is failing validation with a message indicating a Membership has not been selected, even when a selection has been made.
Reproduction steps
- Create a Membership Price Set (Memberships > Manage Price Sets > Add Set of Price Fields). Use a Select or a Radio Button for the Field Type.
- Create a Contribution Page. On the Memberships Tab, select the Price Set made in the previous step.
- After saving, click Contribution Links > Test-drive
- Select a membership, fill out the rest of the form, click Contribute.
- Instead of making the contribution, a validation error is displayed at the top of the Contribution page.
Current behaviour
On a Contribution page with a Membership selection, even if a Membership is chosen, the submission is not successful, and the user receives the following message:
Please correct the following errors in the form fields below:
Please select one of the memberships.
Expected behaviour
If a Membership is selected on the Contribution page, it should be recognized as such and pass the validation.
- CiviCRM: _Master (5.61aplpha1)
Comments
I used git bisect
, and the issue seems to have been introduced by PR 25754 Extract isMembershipPriceSet (useForMember). The exact commit id is e4992726cc41cbef54aead6dd28d010c1640419f