Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.10
-
Component/s: CiviMember
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Same issue as CRM-9577 but for back-end membership form CRM/Member/Form/Membership.php using price set. See description in that issue.
I verified that what happened was exactly as Deepak describes in his comment on that issue:
"The problem was that the quantity entered was being misinterpreted as price_field_value.id and whenever it happened to match with a record in price_field_value table with a membership-type-id of a non-selected membership from the radio list - it would consider it as multiple selection of memberships & would throw that error."
The following change fixed it for me.
--- CRM/Member/Form/Membership.php.orig 2015-10-07 12:48:20.000000000 +0100 +++ CRM/Member/Form/Membership.php 2015-12-14 16:19:41.000000000 +0000 @@ -772,7 +772,7 @@ CRM_Price_BAO_PriceField::priceSetValidation($priceSetId, $params, $errors); $priceFieldIDS = array(); - foreach ($self->_priceSet['fields'] as $priceIds => $dontCare) { + foreach ($self->_priceSet['fields'] as $priceIds => $field) { if (!empty($params['price_' . $priceIds])) { if (is_array($params['price_' . $priceIds])) { @@ -782,7 +782,7 @@ } } } - else { + elseif (!$field['is_enter_qty']) { $priceFieldIDS[] = $params['price_' . $priceIds]; } }
I expect a pull request will be wanted - against which branch?
Attachments
Issue Links
- supplements
-
CRM-9577 Membership Price Set - Text/Quantity field does not function
- Done/Fixed
- links to