Importing targets from csv fails

using:
Version 7.14.3
Sugar Version 6.5.25 (Build 344)

when importing a list of targets from a csv file I get an error after “Step 2: Confirm Import File Properties”. The screen stays white and the readout is:

AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/crm/modules/Import/Forms.php:182\nStack trace:\n#0 /var/www/crm/modules/Import/views/view.step3.php(300): getControl()\n#1 /var/www/crm/include/MVC/View/SugarView.php(210): ImportViewStep3->display()\n#2 /var/www/crm/include/MVC/Controller/SugarController.php(432): SugarView->process()\n#3 /var/www/crm/include/MVC/Controller/SugarController.php(363): SugarController->processView()\n#4 /var/www/crm/include/MVC/SugarApplication.php(101): SugarController->execute()\n#5 /var/www/crm/index.php(52): SugarApplication->execute()\n#6 {main}\n thrown in /var/www/crm/modules/Import/Forms.php on line 182’, referer: https://XXX/crm/index.php

here my test file content:
“First Name”,“Last Name”,“ID”,“Salutation”,“Job Title”,“Department”,“Account Name”,“Email Address”,“Non Primary E-mails”,“Mobile”,“Office Phone”,“Home”,“Other Phone”,“Fax”,“Primary Address Street”,“Primary Address City”,“Primary Address State”,“Primary Address Postal Code”,“Primary Address Country”,“Alternate Address Street”,“Alternate Address City”,“Alternate Address State”,“Alternate Address Postal Code”,“Alternate Address Country”,“Description”,“Birthdate”,“Assistant”,“Assistant Phone”,“Campaign ID”,“Tracker Key”,“Do Not Call”,“Lead Id”,“Assigned to”,“Assigned To”,“Date Created”,“Date Modified”,“Modified By”,“Created By”,“Deleted”,“Email Address”,“Other Email”,“Email Opt Out”,“Invalid Email”,“Photo”,“Lawful Basis”,“Lawful Basis Date Reviewed”,“Lawful Basis Source”,“Geocode Status”,“Latitude”,“Address”,“Longitude”,“import_comment_c”,“language_c”,“presscontact_c”
Max",“Muster”,“”,“”,“”,“”,“”,"muster123@privasphere.com”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“513”,“0”,“65584e6e-496a-aeb4-cf90-4b0ead69bb85”,“frey”,“5a0d93ef-732b-9802-9be2-459533591b16”,“18.05.2007 17:52”,“20.06.2018 13:24”,“dae4c46e-0a2c-fc92-cf54-45953352ab2e”,“5a0d93ef-732b-9802-9be2-459533591b16”,“0”,“some.guy@bluewin.ch”,“”,“off”,“0”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“0”
Joanne",“Doe”,“”,“”,“”,“”,“”,"joanne.doe1123@gmail.com”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“513”,“0”,“65584e6e-496a-aeb4-cf90-4b0ead69bb85”,“frey”,“5a0d93ef-732b-9802-9be2-459533591b16”,“18.05.2007 17:52”,“20.06.2018 13:24”,“dae4c46e-0a2c-fc92-cf54-45953352ab2e”,“5a0d93ef-732b-9802-9be2-459533591b16”,“0”,“some.guy@bluewin.ch”,“”,“off”,“0”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“0”

Try saving the CSV with diffferent progam Excel, OpenOffice, etc. I’ve encountered sometimes where the exact same file if its opened and saved in a different software it works.

Hello,

like Paul wrote, look into your process, how you create the CSV file.

The quotes are wrong. You’ve got:
but it should be: "

If you received the CSV from somewhere else, try an Editor with the search replace function to correct it.

1 Like

thank you for the suggestions, but the result is the same. replacing “ with "

Excel did not change the file, libre office even removed the "

Usually, if you first get your CSV right, the CRM will tell you details about the data.

So after replacing the wrong quotation marks, I was able to use it.

Then the CRM told me further issues:

Error: Invalid boolean value. - Field Name: Email Opt Out: (email_opt_out). - Value: off

One additional hint:
I usually remove all empty columns.
If you do updates and want to remove the values that you have in the CRM, you’d keep the empty columns.
If you only do creates, your field mapping is getting more complicated.

Eventually, the file imports just fine:

First Name,Last Name,Email Address,Tracker Key,Do Not Call,Lead Id,Date Created,Date Modified,Email Address
Max,Muster,muster123@privasphere.com,513,0,65584e6e-496a-aeb4-cf90-4b0ead69bb85,18.05.2007 17:52,20.06.2018 13:24,some.guy@bluewin.ch
Joanne,Doe,joanne.doe1123@gmail.com,513,0,65584e6e-496a-aeb4-cf90-4b0ead69bb85,18.05.2007 17:52,20.06.2018 13:24,some.guy@bluewin.ch

thank you for your help everyone. In the end an update to 7.14.7 helped. The underlieing issue was the jjwg_maps-module (see Jjwg_maps_xxx_c custom fields)