Imports fail on muliselect fields

Hi, I’m trying to import from csv’s through the importer, which does not work if my import includes a multi select field. After submitting my import file with a multi-select field present, I get a pop up warning with this text:

Import Errors:
WARNING: [2] Declaration of SugarFieldMultienum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex) should be compatible with SugarFieldEnum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0) on line 42 in file /var/www/vhosts/suite-stg-atm/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php

Although the error on screen shows up as a warning, the importer stops in its tracks and no data is altered in the database.

I can re-create this error by exporting a single test record with some multi-select values checked off and then trying to reimport it.

Similar errors show up in SuiteCRM log:

Tue Nov 1 23:20:05 2016 [21339][1c1e692c-4bfd-f817-db98-56b1172c4a6c][FATAL] Caught error: Declaration of SugarFieldMultienum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex) should be compatible with SugarFieldEnum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0)
Tue Nov 1 23:20:05 2016 [21339][1c1e692c-4bfd-f817-db98-56b1172c4a6c][FATAL] Caught error: stat(): stat failed for upload/import/status_1c1e692c-4bfd-f817-db98-56b1172c4a6c.csv
Tue Nov 1 23:20:05 2016 [21339][1c1e692c-4bfd-f817-db98-56b1172c4a6c][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!
Tue Nov 1 23:20:05 2016 [21339][1c1e692c-4bfd-f817-db98-56b1172c4a6c][ERROR] File upload://import/status_1c1e692c-4bfd-f817-db98-56b1172c4a6c.csv cannot be touched

Should I be using a different separator for multi-select values or something? Any other suggestions?


Edit: Forgot to mention that I believe we’ve set permissions correctly in the file system. recommended permissions have been applied and the admin --> upgrade check passes with “all files writeable”.

SuiteCRM 7.7.6
System => Linux crm 3.10.0-327.36.3.el7.x86_64.
PHP Version => 7.0.11
mysql Ver 15.1 Distrib 10.1.17-MariaDB, for Linux (x86_64)

what character are your using as a separator?

best regards

For the text separator I was using the default double quote. I just tried single quote text separator in the import file, but I get the same error with either single quote or double quote.

BTW, when I create a test entry in Suite and then select some multiselect values, in the MySQL DB my entries appear like this:


that’s the qualifier character

take a look at this screenshot

personally I use the & as a delimiter and in that screen I modify the field, I just tested this and is working for me with a multiselect field exporting and importing back

best regards

Thanks for the info, but for me this isn’t working. My import properties at step 2 look identical to yours (except for time format, but I don’t have any time fields in my import). If I change my file to use different delimiters or separators and then match the settings in your screenshot to whatever I used to create my csv, I still get the same error.

I’m sure multiselect fields are generally importing OK for other people, or I’d find more results in searches, but so far no joy.

just for testing purpose and if is in your possibilities, can you test it with another PHP version? I use PHP 5.5.9

best regards

Have a look here:
(it is for 7.6 but the description for MultiSelect fields should work also on 6.5)

And search for “Importing Fields With Multiple Values”

Additinnally you can also have a look here:

Also remember to make sure that there are no spaces between the values and that the values correspond exactly to values found in the dropdown list you are using for that field

Ok. this is interesting… We fired up a clean install of SuiteCRM on a new server running PHP 7.0.11 and tried our import there. At first we hit another error, which was “Accessing static property ImportFieldSanitize::$createdBeans as non static”. I had forgotten we had this issue a couple of weeks ago on our production instance as well, and we fixed that problem by following these instructions and changing some code within importer.php. We applied that fix to our test instance again and then we were able to import fields generally but not import muli-select fields in our test instance either (same error as originally described).

We then rolled PHP on the test server back to 5.5.9 and our multi-select import works with no problems. The same csv file & settings fails reliably in PHP 7.

This feels like there may be a bug with the importer and PHP 7.x . Has anyone else had success importing muli-select fields when running PHP 7?


I had the same error when trying to import multiselect fields using php7.0. Switching to php 5.6 solved the problem.

Just change line 61 on include/SugarFields/Fields/Multienum/SugarFieldMultienum.php

function displayFromFunc( $displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0) {

Missing ‘= 0’ at the end.