Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.26
-
Fix Version/s: 4.7.30
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
Since we can make price options 'Public' or 'Admin.CRM-12167
However, this 'visibility_id' field is not mandatory when creating the options. When it is not set, you receive an 'undefined index' error on the front end registration form.
Notice: Undefined index: visibility_id in CRM_Event_Form_Registration_Register::buildAmount() (line 598 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php).
Steps to recreate:
- Create a priceset
- Create a price field, type 'Select'
- When adding price options, notice that it is possible to change the 'Visibility' to '- select -'
- Do that, and save
- Add the price set to an event
- View the event registration form as an anonymous user
- Notice the error message
Mitigation:
- The form does default to 'public', so it's unlikely anyone would change this to '- select -'
Steps to fix:
- Remove the '- select -' option from the visibility drop down on price options.