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) »
  • Bug on Create Individual
Pages: [1]

Author Topic: Bug on Create Individual  (Read 964 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Bug on Create Individual
November 05, 2012, 03:28:51 am
On a new Drupal 7 CiviCRM 4.2.6 site, when I try to add a contact I get:

Code: [Select]
[user_info] => INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date )
VALUES ('civicrm_contact' ,  373 , 'civicrm_contact,373' ,  1 ,  20121105132110 )
 [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails
 (`xxxxx_civicrm`.`civicrm_log`, CONSTRAINT `FK_civicrm_log_modified_id`
FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]

Can't understand why it's doing that however.

In civicrm_contact that last id is 371. If I try to create another contact, I get the same error but with contact 375 instead of 373. However the last id in civicrm_contact is still 371.
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.

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: Bug on Create Individual
November 05, 2012, 08:55:37 am

seems like modified_id, aka contact 1 does not exist

can u log out and log back n

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

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bug on Create Individual
November 05, 2012, 09:04:40 am
Quite right, lobo. I was mis-reading the error message. :(

Thank you.
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 »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bug on Create Individual

This forum was archived on 2017-11-26.