Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1219

New install of 1.5, insert fails with foreign key constraint

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Labels:
      None

      Description

      I am on the latest Ubuntu which has apache 2, mysql 5.0.22, and php 5.1.2.
      I downloaded the latest Drupal, 4.7.3.
      I downloaded the latest civicrm, 1.5.

      I followed the installation instructions, and loaded these 2 sql files:

      civicrm_41.mysql
      civicrm_data.mysql

      I went to CiviCRM Home on my drupal site, clicked to add a new Individual, and got the following
      error:

      Sorry. A non-recoverable error has occurred.

      Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`drupal_intranet/civicrm_log`, CONSTRAINT `civicrm_log_ibfk_1` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`)), 1452

      Return to CiviCRM menu.

      error

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

      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_log (entity_table , entity_id , modified_id , modified_date ) VALUES ('civicrm_individual' , 1 , 102 , 20060913023105 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`drupal_intranet/civicrm_log`, CONSTRAINT `civicrm_log_ibfk_1` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`))]
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_log (entity_table , entity_id , modified_id , modified_date ) VALUES ('civicrm_individual' , 1 , 102 , 20060913023105 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`drupal_intranet/civicrm_log`, CONSTRAINT `civicrm_log_ibfk_1` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`))]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_log (entity_table , entity_id , modified_id , modified_date ) VALUES ('civicrm_individual' , 1 , 102 , 20060913023105 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`drupal_intranet/civicrm_log`, CONSTRAINT `civicrm_log_ibfk_1` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`))]"]
      )

      Is this release ready for prime time?

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              hsfdrupal None
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: