CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error registering participant from Admin Menu
Pages: [1]

Author Topic: Error registering participant from Admin Menu  (Read 326 times)

jeff porter

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 2
Error registering participant from Admin Menu
May 29, 2014, 03:06:38 pm
We are on CiviCRM 4.4.3 - We are trying to register event participants.  We have both a user registration form (front end) and obviously a way to register participants from the Admin menu.

When you register from the front end it works..  But, if you use the "Events -> Register Event participant" option from the backend - it does not.

In one case (the working case), it is using the event_id to look up the constraint
In the other case (backend - non-working case), it appears to be using the participant's id to look up a foreign key constraint against the events table and the IDs don't match

If I go to the admin menu and try to register an event participant from there, i get this error:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_value_conference_registration_12  ( participant_2_first_name_33,additional_participants_35,additional_conference_participan_41,entity_id ) VALUES ( '','','',712 ) ON DUPLICATE KEY UPDATE participant_2_first_name_33 = '',additional_participants_35 = '',additional_conference_participan_41 = '' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`fpwr_civi_433/civicrm_value_conference_registration_12`, CONSTRAINT `FK_civicrm_value_conference_registr_91ad01a1a86df0c7` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DELET)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_value_conference_registration_12  ( participant_2_first_name_33,additional_participants_35,additional_conference_participan_41,entity_id ) VALUES ( '','','',712 ) ON DUPLICATE KEY UPDATE participant_2_first_name_33 = '',additional_participants_35 = '',additional_conference_participan_41 = '' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`fpwr_civi_433/civicrm_value_conference_registration_12`, CONSTRAINT `FK_civicrm_value_conference_registr_91ad01a1a86df0c7` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DELET)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_conference_registration_12  ( participant_2_first_name_33,additional_participants_35,additional_conference_participan_41,entity_id ) VALUES ( '','','',712 ) ON DUPLICATE KEY UPDATE participant_2_first_name_33 = '',additional_participants_35 = '',additional_conference_participan_41 = '' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`fpwr_civi_433/civicrm_value_conference_registration_12`, CONSTRAINT `FK_civicrm_value_conference_registr_91ad01a1a86df0c7` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DELET)]"]
)

It appears that its using the participants entity_id, not the events entity_id - and the foreign key constraint / relationship is with the event table

Anyone else see this?  How can I fix?
« Last Edit: June 02, 2014, 03:46:31 pm by jeff porter »
Jeff Porter
Foundation for Prader-Willi Research (www.fpwr.org)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error registering participant from Admin Menu

This forum was archived on 2017-11-26.