CSV Import Error

By gversion - September 29, 2019


I am receiving the following error when trying to import a CSV file using the plugin:

Error: There was an error sending the request! (200 parsererror) parsererror - SyntaxError: Unexpected token ( in JSON at position 1

Could someone please help me out with this? I have not seen this error before and I am not sure what to be looking for...



By daniel - September 30, 2019

Hi Greg,

It appears you're using an older version of the plugin which throws that error on systems running PHP 7. This can be fixed by either updating to the latest version of the plugin or by applying a simple patch. If you locate the following line in csvImport_functions.php (line 500):

    $maxColumnCount = max($maxColumnCount, count($colValues));

And replace it with this:

    if (!$colValues) { $done = true; break; } //If we're dealing with a blank line, skip it and stop the form analysis
    $maxColumnCount = max($maxColumnCount, count($colValues));

That should hopefully fix the error. Let me know if you have any other questions!


PHP Programmer

By gversion - September 30, 2019

Thanks, Daniel - I have updated the plugin and now all is working again!