Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6, 4.7
-
Fix Version/s: None
-
Component/s: CiviEvent
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
If you create a participant role which has a non numeric value, it breaks the event info pages and several event full checks.
I can reproduce this on the 4.6 and master demo site.
This is because the check on roles_is faulty assumes that the participant role values are integers
IMO there are two approaches to fix this:
- force numeric values for the participant_role option_values when added through UI and API.
- don't use the custom values for participant roles
- don't assume the participant role ids are numeric
The last approach is IMO "better" (but still not optimal), as enforcing numeric values through the API would add a lot of overhead to the customvalue.create logic, and rewriting the whole participant_role logic would be quite big.
I will create a PR with the last solution.