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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6
Pages: [1]

Author Topic: CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6  (Read 864 times)

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6
October 01, 2011, 05:24:10 am
I get the error below when submitting a new registration or editing an existing registration that uses a custom profile.  I have tried logging out, using the #1 user, other admin accounts, and emptying all cache tables.

Code: [Select]
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`bikewalk_bwkc`.`civicrm_value_rhythm_and_ribs_bike_valet_8`, CONSTRAINT `FK_civicrm_value_rhythm_and_ribs_bi_fb529559e8c9018d` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON D), 1452
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_value_rhythm_and_ribs_bike_valet_8  ( volunteer_shift_34,shirt_size_35,entity_id ) VALUES ( '3-6','medium',692 ) ON DUPLICATE KEY UPDATE volunteer_shift_34 = '3-6',shirt_size_35 = 'medium' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`bikewalk_bwkc`.`civicrm_value_rhythm_and_ribs_bike_valet_8`, CONSTRAINT `FK_civicrm_value_rhythm_and_ribs_bi_fb529559e8c9018d` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON D)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_value_rhythm_and_ribs_bike_valet_8  ( volunteer_shift_34,shirt_size_35,entity_id ) VALUES ( '3-6','medium',692 ) ON DUPLICATE KEY UPDATE volunteer_shift_34 = '3-6',shirt_size_35 = 'medium' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`bikewalk_bwkc`.`civicrm_value_rhythm_and_ribs_bike_valet_8`, CONSTRAINT `FK_civicrm_value_rhythm_and_ribs_bi_fb529559e8c9018d` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON D)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_rhythm_and_ribs_bike_valet_8  ( volunteer_shift_34,shirt_size_35,entity_id ) VALUES ( '3-6','medium',692 ) ON DUPLICATE KEY UPDATE volunteer_shift_34 = '3-6',shirt_size_35 = 'medium' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`bikewalk_bwkc`.`civicrm_value_rhythm_and_ribs_bike_valet_8`, CONSTRAINT `FK_civicrm_value_rhythm_and_ribs_bi_fb529559e8c9018d` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON D)]"]
)

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Re: CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6
October 02, 2011, 12:49:17 am
I have just performed an upgrade from 3.3.5 to 3.4.6.
I checked our installation and event process. No error messages like yours.

Something may have happened during the upgrade process (maybe), you could try 're-installing' the database from a backup. :-\
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6
October 02, 2011, 01:56:03 pm
erogers, did you run the upgrade tool? ie: civicrm/upgrade?reset=1 ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviEvent constraint error after upgrade from 3.3.5 to 3.4.6

This forum was archived on 2017-11-26.