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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • civicrm 1.6 and drupal 4.7 error
Pages: [1]

Author Topic: civicrm 1.6 and drupal 4.7 error  (Read 2186 times)

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
civicrm 1.6 and drupal 4.7 error
May 11, 2007, 10:43:29 am
Anyone seen this?


When I try to edit an user (to change their role/email whatever) and hit submit..I get this error :


    Sorry. A non-recoverable error has occurred.

   Database Error Code: Cannot add or update a child row: a foreign
key constraint fails, 1216

   Return to CiviCRM menu.

error

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

       
Code: [Select]
=> -3
   [message] => DB Error: constraint violation
   [mode] => 16
   [debug_info] => INSERT INTO civicrm_email (email , is_primary )
VALUES ('barnyveep@yahoo.co.in' ,  1 )  [nativecode=1216 ** Cannot add
or update a child row: a foreign key constraint fails]
   [type] => DB_Error
   [user_info] => INSERT INTO civicrm_email (email , is_primary )
VALUES ('barnyveep@yahoo.co.in' ,  1 )  [nativecode=1216 ** Cannot add
or update a child row: a foreign key constraint fails]
   [to_string] => [db_error: message="DB Error: constraint violation"
code=-3 mode=callback callback=CRM_Core_Error::handle prefix=""
info="INSERT INTO civicrm_email (email , is_primary ) VALUES
('barnyveep@yahoo.co.in' ,  1 )  [nativecode=1216 ** Cannot add or
update a child row: a foreign key constraint fails]"]
)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: civicrm 1.6 and drupal 4.7 error
May 11, 2007, 11:45:45 am

I remember seeing such errors in the past and my memory is a bit hazy on it. You might want to search the nabble mail archives

The FK error is being thrown because there is no valid location_id in the insert. Can u ensure that all your location names are just alphanumeric (no spaces or punctuation characters). I think this might be the bug

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: civicrm 1.6 and drupal 4.7 error
May 11, 2007, 12:31:24 pm
Do you mean 'default location type' ? If so, it doesnt have any space (its just 'Work')

However, I noticed that I am unable to syncrhronize users to contacts either

 [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_uf_match (uf_id , contact_id , domain_id , email ) VALUES ( 14 ,  104 ,  1 , 'barnyveep@yahoo.co.in' )  [nativecode=1062 ** Duplicate entry '104' for key 2)

Related errors maybe?

-v

p.s the system has been live for 5 months..so..these errors are new

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • civicrm 1.6 and drupal 4.7 error

This forum was archived on 2017-11-26.