Hi,
I have a csv file export from the website.
When i expand this file the import wont work.
i gret the next messeage:
Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/eenvoud/public_html/oplsshop.eenvoudiguwwebsite.nl/wp-content/plugins/event-organiser-csv/includes/class-eo-csv-parser.php on line 117
Warning: Invalid argument supplied for foreach() in /home/eenvoud/public_html/oplsshop.eenvoudiguwwebsite.nl/wp-content/plugins/event-organiser-csv/includes/class-eo-csv-parser.php on line 138
Do you have any idea what this is?
Thanks for the information
regards,
Jeroen
Jeroen Janssen
I now try to import without the first line.
This went for 75% well.
I want to use a short code in the content.
example: [button link=”/shop/test-test/arnhem-test/”]Inschrijven[/button]
The ” ” makes that the shortcode dos not work.
When i last upload a excel every things works…..
Is there something change?
regards,
Jeroen
Jeroen Janssen
Hi Jeroen
That error message would occur if the number of columns in the first line (which is the “header” row) doesn’t match the number of columns of subsequent rows. The plug-in automatically ‘slices’ off excess columns of a row, so in this case it would seem the problem is that a row doesn’t contain enough columns.
An obvious and easy to solution would be to pad the columns if required, which I’ll do in an update.
For an immediate fix it should be enough to ensure that each line of your CSV files has enough delimiters. Specifically instead of
A, B, C, D, E
A, B
A, B, C, D, E
you would have
A, B, C, D, E
A, B,,,
A, B, C, D, E
I’ll look into the issue regarding the shortcode.
Stephen Harris
That would be great . (shortcode)
in the mean time I will test the other thing.
Jeroen Janssen
Hi Jeroen,
Since "
are used to separate fields I found it necessary to do the following:
"A","B","C","[button link=""/shop/test-test/arnhem-test/""]Inschrijven[/button]","D","E"
That is enclosing each value in double quotes, and preceding each double quote in the value with a double quote. This is the format the plug-in should be exporting CSV files and is the “correct” format (though CSV is very loosely defined).
The ‘example’ CSV file included with the plug-in doesn’t include this format since it doesn’t contain any double quotes, but perhaps it should be updated to reflect this case.
Stephen Harris