4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 30   (RSS)

Hello,

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...

Regards,

Greg

Here is an error I found in the log in case it helps:

E_WARNING: count(): Parameter must be an array or an object that implements Countable
/home/sites/8b/7/786382f535/public_html/cmsb/plugins/csvImport/csvImport_functions.php (line 500)

--

Thanks as always!

Greg

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!

Thanks,

Daniel
PHP Programmer
interactivetools.com