Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Blocker
-
Resolution: Cannot Reproduce
-
Affects Version/s: 3.1.3
-
Fix Version/s: None
-
Component/s: CiviEvent
-
Labels:None
Description
#1452 - Cannot add or update a child row: a foreign key constraint fails (`blackmountain_civicrm/civicrm_value_scouts_2`, CONSTRAINT `FK_civicrm_value_scouts_2_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DELETE CASCADE)
When trying the following INSERT:
INSERT INTO civicrm_value_scouts_2 ( rank_4,grade_5,pack_number_8,parent_guardian_s_name_11,t_shirt_size_9,archery_program_13,information_14,entity_id ) VALUES ( 'Web2','5','685','Julie Knowles','YL',1,'',52 ) ON DUPLICATE KEY UPDATE rank_4 = 'Web2',grade_5 = '5',pack_number_8 = '685',parent_guardian_s_name_11 = 'Julie Knowles',t_shirt_size_9 = 'YL',archery_program_13 = 1,information_14 = ''
I believe the problem is that entity_id should refer to civicrm_participant ('id') and not civicrm_event ('id').