2

I am getting the following warnings when trying to import contacts:

Warning: explode() expects parameter 2 to be string, array given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 704

Warning: array_pop() expects parameter 1 to be array, null given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 706

Warning: Cannot modify header information - headers already sent by (output started at //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php:704) in //wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 912

At first I thought there were unseen characters in the csv file but determined it only complains on contacts that already exist. It appears to update the matching contact but does not add the contact to the specified group on import and it creates a strange log in the matching contact's record with references to other contacts in the import!

The comment above this section of code in lines 704-706 refers to "CRM-10433 - might return comma separate list of all dupes". The Jira title of this issue is: import fails when updating on duplicate, adding to group, and multiple duplicates exist (related!?!?)

I am deduping on Name and Email using the Update option although the error also occurs on Fill. I am running 4.7.19 in WP and I upgraded recently from 4.6.20 where the client did not have this problem.

Is this fix from 4.2 no longer compatible with 4.7.x!?!?

1

Per comment above the fix was part of CiviCRM 4.7.23 and hence the solution is to upgrade to the latest version where it is fixed.

( I keep seeing issues bumped, presumably by a bot where it is a long-fixed bug & no longer relevant)

  • If a Question doesn't get any upvoted or accepted answers then it keeps coming back to the surface. I am going to edit your A by adding J's link and hopefully it will get some upvotes and Karen S will Accept it. – petednz - fuzion Jun 7 '18 at 20:54
0

I just discovered this same issue today on WP 4.8.1 CiviCRM 4.7.22. Examining the code at line 704, I made the edit to treat $newContact['error_message']['params'][0] as an array instead of a comma-separated list. I see that is also the proposed fix in CRM-20739 that Karen S references. I was worried that my quick hack might break something else, until I checked in here. Will this be fixed in an upcoming CiviCRM update?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.