Importing 88 record I get a strange error

Importing a csv file (compiled by hand) I receive this strange error (probably it islonger, but I can’t copy and paste more of this):

Import errors:
NOTICE: [8] Undefined offset: 7 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 6 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 5 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 4 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 3 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 2 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 7 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 6 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 5 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 4 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 3 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 2 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 7 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 6 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 5 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 4 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 3 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php
NOTICE: [8] Undefined offset: 2 on line 195 in file SUITECRM/include/SugarEmailAddress/SugarEmailAddress.php

Any suggestions to get a better .csv file to import?
Of 88 records, only 63 are being imported.

It seems warning only. Can you try with display error off ?

This can be turned off by setting display_errors to off in your php.ini file.

Thanks! I took a look around and now I imported 87 of 88 records.
But I still have the same error, because I am not able to disable the errors.
I can’t use php.ini on fastcomet, but I have to modify the .htaccess file.

  • Adding this line
php_value display_errors -1

nothing change

  • Adding this line
php_value display_errors off

nothing change

  • Adding this line
php_value display_errors Off 

I get internal error 500

You may request your hosting provider for the same. Because in production server. it should not display any error or message on screen.

Ok, I opened a ticket, fastcomet is always very fast for such things. In the while I added the missed record by hand and I found that the email address was wrong.

here the answer of fastcomet ad my ask to disable the errors in php.ini:

Hi matteoraggi,

I’m with suiteCRM 7.7.6 and php on 5.6 and import function works fine, I had the same error when I upgraded suiteCRM to 7.7.9 & 7.8.3 and I stayed on php 5.6.

I solved this updating php to 7.0.

Hope it helps.

Sorry,

I was rather too quick.

It only works for 7.7.9 and php 7.0. When you upgrade 7.8.3 and php 7.0 still having the same issue. So I think it has to be something with the latest versions of SuiteCRM.

P.D.: I also tried to put display_errors=off and nothing happened. I have a dedicated server.

Well after trying countless things, I was able to import the .csv and had nothing to do with char codification, php version and nothing like that.

Summarizing, the problem is that I was reassigning a field during import that wasn’t importable and then the “NOTICE: [8] Undefined offset” error appear, so above all things, check that fields are importable in Studio, especially if it is a custom module like in my case.

1 Like