Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.6
-
Fix Version/s: 4.5
-
Component/s: CiviContribute
-
Labels:None
-
Documentation Required?:None
Description
Reenabling the 'Allow Other Amounts' selection when editing a contribution page definition leaves the field inactive. The 'other_amounts' field does not appear when rendering the contribution page.
Steps to reproduce:
1. Create contribution page with at least one fixed contribution option, and 'Allow other amounts' checked.
2. On e.g., civicrm/admin/contribute/amount?action=update&reset=1&id=1, uncheck 'Allow other amounts' and save; check 'Allow other amounts' again and save.
3. Render the contribution page, e.g., civicrm/contribute/transact?reset=1&id=1.
3. The 'other_amounts' text field is not rendered. The 'other_amount' field in civicrm_price_field for the form's price_set_id has is_active == 0.
The problem seems to be occuring at CRM_Contribution_Form_ContributionPage_Amount::postProcess(), line 652 but I can't follow the logic well enough to propose a fix. The 'if (!$noContriAmount) {}' guard prevents the field properties from being created, yet there appears to be an assumption that CRM_Price_BAO_PriceField::add($fieldParams); will update the field properties without that. It won't.