I’m trying to import a CSV file with clients. I upload the file and apparently map fields correctly, but when doing final import action I get a “500: Server Error”.
Looking at storage/logs/laravel.log I get this message:
production.ERROR: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements {“userId”:1,“exception”:"[object] (ValueError(code: 0): array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements at /var/www/html/invoice-mtm/app/Import/Providers/BaseImport.php:647)
These are the fields in my CSV file:
name
address1
city
state
postal_code
phone
custom_value1
vat_number
number [maps to client.custom_value3]
custom_value2
country_id
company_id
user_id
As a difference, this time 4 rows are imported, 5th row doesn’t differ much from previous rows. Phone and email are empty, but so are in some of the previous rows which where inserted.
BTW, I can see new rows in database table clients but they don’t appear in app Client list.
ERROR: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements {“userId”:1,“exception”:"[object] (ValueError(code: 0): array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements at /var/www/html/invoice-mtm/app/Import/Providers/BaseImport.php:649)