Details
Description
Civi throws and error when attempting to save a participant record if the record includes data in an admin-only price set field. Editing the value in the price set field results in error and no change to record. Editing participant role, on the other hand, successfully changes the role, but still throws an error.
Replicated on the (d7) demo server. Was working as recently as 4.0.8, and perhaps more recently than that.
Might be related to CRM-10032 based only on the similarity of error messages.
Demo server error:
DB Error: already exists
More detailed error message from my install:
<pre>Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -5
[message] => DB Error: already exists
[mode] => 16
[debug_info] => INSERT INTO civicrm_line_item (entity_table , entity_id , price_field_id , label , qty , unit_price , line_total , participant_count , price_field_value_id ) VALUES ('civicrm_participant' , 10276 , 57 , 'Comp Tickets' , 3 , 0.00 , 0 , 3 , 47 ) [nativecode=1062 ** Duplicate entry 'civicrm_participant-10276-47-57' for key 2]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_line_item (entity_table , entity_id , price_field_id , label , qty , unit_price , line_total , participant_count , price_field_value_id ) VALUES ('civicrm_participant' , 10276 , 57 , 'Comp Tickets' , 3 , 0.00 , 0 , 3 , 47 ) [nativecode=1062 ** Duplicate entry 'civicrm_participant-10276-47-57' for key 2]
[to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_line_item (entity_table , entity_id , price_field_id , label , qty , unit_price , line_total , participant_count , price_field_value_id ) VALUES ('civicrm_participant' , 10276 , 57 , 'Comp Tickets' , 3 , 0.00 , 0 , 3 , 47 ) [nativecode=1062 ** Duplicate entry 'civicrm_participant-10276-47-57' for key 2]"]
)
</pre>