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) »
  • Error on Import
Pages: [1] 2

Author Topic: Error on Import  (Read 3695 times)

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Error on Import
April 02, 2012, 07:07:06 am
Hi,

I am trying to import a csv file and when I click on yes Are you sure, I get this error message on the next screen:

Fatal error: Call to undefined function _civicrm_api3_deprecated_duplicate_formatted_contact() in /home/nywriter/public_html/wp-content/plugins/civicrm/civicrm/CRM/Import/Parser/Contact.php on line 552

How do I correct it?

Thanks,

Dana

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 07:52:09 am
Hello Dana,

Can you find that contact.php file and copy and paste line 552 here? Does this error occur all the time when trying an import?
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 08:26:33 am
Thanks for your response Satchmo

Line 552 is this:

            $error = _civicrm_api3_deprecated_duplicate_formatted_contact( $formatted );

Yes, I've tried importing a few things and it always takes me to the same error.

Thanks!

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 08:54:13 am
It seems that this is related to a duplicate contact ID. Are you importing records into an empty database or trying to update existing contacts?
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 09:44:20 am
Ok, so I found the ID and removed it, was able to import but now I get this error in site:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@nywriterscoalition.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_fcgid/2.3.6 Phusion_Passenger/3.0.9 mod_bwlimited/1.4 Server at nywriterscoalition.org Port 80

I can access admin area, but not main site. Any thoughts?

Thanks!

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 10:36:39 am
You found the ID and removed it where? That shouldn't break your site like that.
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 10:42:07 am
There was a hidden column with and ID heading.

There are 500 contacts to import, about 200 are being imported before it times out. I have tried reimporting a couple of times now and it's the same results. Server support is thinking the timing out could be causing the error. Any other thoughts?

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 10:55:06 am
The timeout wouldn't give the site a 500 internal server error indefinitely...only immediately after the timeout. If you can't increase your PHP memory limit then you should just breakup the import into smaller pieces.
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 12:23:32 pm
Good thought, I'll import fewer contacts at a time. It's weird, since the whole file 44kb and the php memory limit is at 128MB. Any thoughts on how I get fix the 500 error?

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 02:48:11 pm
Well something had to happen prior to the 500 error. You said you changed something in the import file...what did you change on the server side? You should revert back to before the change.
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 03:01:54 pm
I'll likely do that tonight.

I broke import file down into sets off 100 and on the 300 one I got this error:

Database Error Code: Column count doesn't match value count at row 25, 1136
Additional Details:

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

       
Code: [Select]
=> -22
    [message] => DB Error: value count on row
    [mode] => 16
    [debug_info] =>
REPLACE INTO civicrm_group_contact ( group_id, contact_id, status )
VALUES

Any thoughts on that?

Thanks for your support, much appreciated!

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Error on Import
April 09, 2012, 03:08:20 pm
You're doing the import through the frontend of Civi right? Can you tell what the problem is on row 25? And your matching the fields in Civi to the ones in the CSV? It goes without saying that you need to have any fields created on the civi side before you can import them.
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 09, 2012, 03:22:23 pm
I am and they are all mapped or not imported from Civi. I checked that out out and I can't see why it's causing the error. I removed that row and tried import and got the same error, so not sure what it could be.

hbergin

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 6
  • CiviCRM version: 3.4.5 to 4.4.1
  • CMS version: Drupal 6.28 to 7.23
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Error on Import
April 10, 2012, 01:50:57 pm
glocalwebtech: Can you list the columns you are trying to import?  If you could include what you are mapping them to, that may also help in better understanding the background to your import task.

glocalwebtech

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: WordPress 3.3.1
  • MySQL version: 5.1.61
  • PHP version: 5.2.17
Re: Error on Import
April 19, 2012, 08:13:10 am
I think I figured it out, thanks for all your help.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Error on Import

This forum was archived on 2017-11-26.