Sudently i have a problem

Hi Wappler team.

Suddenly I have this problem. I have had a working “import CSV file” importing data to a database. When trying to import a file this morning, I get an error. I used the functionality last week, and it worked as always. The only thing I have changed is updating the version of Wappler and a small test of changing the database to MSSQL, but I couldn’t connect, so I went back to MySQL. I have tested with the same file that worked last week; the file uploads correctly.

I get an message “Array to string conversion” and the trace: “#0 [internal function]: exception_error_handler(8, ‘Array to string…’, ‘/var/www/kaib.d…’, 105, Array)↵#1 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/db/Connection.php(105): PDOStatement->bindParam(4, ‘Array’, 2)↵#2 /var/www/kaib.dk/golfert.dk/dmxConnectLib/modules/dbupdater.php(38): lib\db\Connection->execute(‘INSERT INTO `re…’, Array, false, ‘resultemp’)↵#3 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(163): modules\dbupdater->insert(Object(stdClass), ‘insert1’)↵#4 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Object(stdClass))↵#5 /var/www/kaib.dk/golfert.dk/dmxConnectLib/modules/core.php(82): lib\App->exec(Object(stdClass), true)↵#6 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(163): modules\core->condition(Object(stdClass), ‘’)↵#7 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Object(stdClass))↵#8 /var/www/kaib.dk/golfert.dk/dmxConnectLib/modules/core.php(62): lib\App->exec(Object(stdClass), true)↵#9 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(163): modules\core->repeat(Object(stdClass), ‘repeat1’)↵#10 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(128): lib\App->execSteps(Object(stdClass))↵#11 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Array)↵#12 /var/www/kaib.dk/golfert.dk/dmxConnectLib/lib/App.php(71): lib\App->exec(Object(stdClass))↵#13 /var/www/kaib.dk/golfert.dk/dmxConnect/api/index/secure/scoreupload/newscores.php(8): lib\App->define(Object(stdClass))↵#14 {main}”

Best regards Kai

Just out of pure and utter interest is this CSV also a new one you have never imported before, maybe try importing a CSV file you have successfully imported before and see if it works as it should. If you have reverted your file importer to the old version then i would look at the CSV itself as the next possible cause.

Some CSV files contain something called a BOM (Byte Order Mark), and in certain instances I have noticed it can cause some strange behaviour, if you want to look through your CSV file manually for it, I have found the best way is using the built in edit command from the cPanel file manager as all the other text editing applications like to hide them.

Hi psweb
Thank you for taking the time to help me out.

I have tested with older files, and it is the same issue. I can’t see any BOM marks. I have tested with only one line in the file and I have changed the values to only 1, and it gives the same error. I think this issue is in Wappler. And it can be that something has happened after I test with MSSQL. Really strange problem.
@Teodor can you help?