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 Import (Moderator: Yashodha Chaku) »
  • Import failure index2.php foreign key constraint
Pages: [1]

Author Topic: Import failure index2.php foreign key constraint  (Read 3541 times)

talexander

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Import failure index2.php foreign key constraint
July 15, 2010, 08:32:21 am
I am getting an error trying to import contacts.  Everything was fine initially but wanted to change some custom field mappings.  Deleted all the contacts and went to import them.  changed the field mapping and instead of importing it makes me download index2.php which towards the end states there is a foreign key constraint.  Is there anyway around this?  (error message below)


Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Import Contacts</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <base href="/administrator/components/com_civicrm/civicrm/" />
  <style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css);</style>
  <style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/extras.css);</style>
</head>

<body>

<div id="crm-container" lang="en" xml:lang="en">

<div class="messages status">
  <dl>
  <dt><img src="/administrator/components/com_civicrm/civicrm/i/Error.gif" alt="unrecoverable error" /></dt>
  <dd>
      Sorry. A non-recoverable error has occurred.      <p></p>
    <hr style="solid 1px" />
    <p>DB Error: constraint violation</p>
      <p>Database Error Code: Cannot add or update a child row: a foreign key constraint fails (temp file operation failed), 1452</p>
      <p><a href="http://XXXXXX.XXXXX.co.uk/administrator/" title="Main Menu">Return to home page.</a></p>
  </dd>
  </dl>
</div>

</div>
</body>
</html><p>Error Details:</p><p><pre>Array
(
    [callback] =&gt; Array
        (
            [0] =&gt; CRM_Core_Error
            [1] =&gt; handle
        )

    [code] =&gt; -3
    [message] =&gt; DB Error: constraint violation
    [mode] =&gt; 16
    [debug_info] =&gt; INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  2 , 'civicrm_contact,2' ,  381 ,  20100715161941 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (temp file operation failed)]
    [type] =&gt; DB_Error
    [user_info] =&gt; INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  2 , 'civicrm_contact,2' ,  381 ,  20100715161941 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (temp file operation failed)]
    [to_string] =&gt; [db_error: message=&quot;DB Error: constraint violation&quot; code=-3 mode=callback callback=CRM_Core_Error::handle prefix=&quot;&quot; info=&quot;INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  2 , 'civicrm_contact,2' ,  381 ,  20100715161941 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (temp file operation failed)]&quot;]
)
</pre></p><p></p>
[/code]

talexander

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Re: Import failure index2.php foreign key constraint
July 16, 2010, 03:51:51 am
Managed to circumvent the error by manually editting some tables.  However I am now getting a timeout error when importing some new contacts.  Any thoughts?

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Import Contacts</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <base href="/administrator/components/com_civicrm/civicrm/" />
  <style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css);</style>
  <style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/extras.css);</style>
</head>

<body>

<div id="crm-container" lang="en" xml:lang="en">

<div class="messages status">
  <dl>
  <dt><img src="/administrator/components/com_civicrm/civicrm/i/Error.gif" alt="unrecoverable error" /></dt>
  <dd>
      Sorry. A non-recoverable error has occurred.      <p></p>
    <hr style="solid 1px" />
    <p>Connection timed out</p>
      <p><a href="http://tindallriley.triley.co.uk/administrator/" title="Main Menu">Return to home page.</a></p>
  </dd>
  </dl>
</div>

</div>
</body>
</html><p>Error Details:</p><p><pre>Array
(
    [callback] =&gt; Array
        (
            [0] =&gt; CRM_Core_Error
            [1] =&gt; handle
        )

    [code] =&gt; 110
    [message] =&gt; Connection timed out
    [mode] =&gt; 16
    [debug_info] =&gt;
    [type] =&gt; PEAR_Error
    [user_info] =&gt;
    [to_string] =&gt; [pear_error: message=&quot;Connection timed out&quot; code=110 mode=callback callback=CRM_Core_Error::handle prefix=&quot;&quot; info=&quot;&quot;]
)
</pre></p><p></p>
[/code]

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import failure index2.php foreign key constraint
July 19, 2010, 03:20:29 am
In general you should not do any db manipulation, just logout and then login to joomla.

HTh
Kurund
Found this reply helpful? Support CiviCRM

talexander

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Re: Import failure index2.php foreign key constraint
July 21, 2010, 08:45:02 am
Well I finally got to the bottom of this.  Turns out it was the mapping info lookup on import that was causing the timeout.  Serious relief now.

This is most likely the same restrictive firewall that was blocking the svn call for the update to the debugging tools.
« Last Edit: July 21, 2010, 08:47:41 am by talexander »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import failure index2.php foreign key constraint

This forum was archived on 2017-11-26.