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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • DB Error on Creating Custom Fieldset
Pages: [1]

Author Topic: DB Error on Creating Custom Fieldset  (Read 825 times)

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
DB Error on Creating Custom Fieldset
March 29, 2011, 06:23:27 am
I'm getting a non-recoverable error when I try to create a custom field set.  Any ideas what the problem is?  This is a brand new installation of 3.3.6.

Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`lyrictest_widcivicrm`.`civicrm_custom_group`, CONSTRAINT `FK_civicrm_custom_group_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL), 1452
Additional Details:

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

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_custom_group (name , title , extends , extends_entity_column_value , style , collapse_display , help_pre , help_post , weight , is_active , table_name , is_multiple , max_multiple , collapse_adv_display , created_id , created_date ) VALUES ('Member_Info' , 'Member Info' , 'Contact' ,  NULL , 'Inline' ,  1 , '' , '' ,  1 ,  1 , 'civicrm_value_member_info' ,  0 ,  NULL ,  0 ,  103 ,  20110329091620 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`lyrictest_widcivicrm`.`civicrm_custom_group`, CONSTRAINT `FK_civicrm_custom_group_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_custom_group (name , title , extends , extends_entity_column_value , style , collapse_display , help_pre , help_post , weight , is_active , table_name , is_multiple , max_multiple , collapse_adv_display , created_id , created_date ) VALUES ('Member_Info' , 'Member Info' , 'Contact' ,  NULL , 'Inline' ,  1 , '' , '' ,  1 ,  1 , 'civicrm_value_member_info' ,  0 ,  NULL ,  0 ,  103 ,  20110329091620 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`lyrictest_widcivicrm`.`civicrm_custom_group`, CONSTRAINT `FK_civicrm_custom_group_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_custom_group (name , title , extends , extends_entity_column_value , style , collapse_display , help_pre , help_post , weight , is_active , table_name , is_multiple , max_multiple , collapse_adv_display , created_id , created_date ) VALUES ('Member_Info' , 'Member Info' , 'Contact' ,  NULL , 'Inline' ,  1 , '' , '' ,  1 ,  1 , 'civicrm_value_member_info' ,  0 ,  NULL ,  0 ,  103 ,  20110329091620 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`lyrictest_widcivicrm`.`civicrm_custom_group`, CONSTRAINT `FK_civicrm_custom_group_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL)]"]

Thanks,
Annalee
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: DB Error on Creating Custom Fieldset
March 29, 2011, 06:55:39 am
Looks like a foreign key constraint issue.


Looks like it can't reference the contact (which should correlates to your drupal user) that does not exist in your database.

Hope it makes sense,


Cheers!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • DB Error on Creating Custom Fieldset

This forum was archived on 2017-11-26.