Page 1 of 1

Errors importing data

PostPosted: Wed Sep 23, 2009 5:59 pm
by cbrunet
Hi,

I wrote a custom import filter. When I execute it, it works, but displays some warnings

Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /var/www/html/xataface-1.1.5r2/Dataface/ImportForm.php on line 301

Warning: Invalid argument supplied for foreach() in /var/www/html/xataface-1.1.5r2/Dataface/ImportForm.php on line 313

Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/xataface-1.1.5r2/Dataface/RecordGrid.php on line 99

Warning: Invalid argument supplied for foreach() in /var/www/html/xataface-1.1.5r2/Dataface/RecordGrid.php on line 159



When I try to import a very large set of data (a 2.1 MB file contaning more than 12K CSV entries), it gives me the following warnings:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/xataface-1.1.5r2/Dataface/RecordGrid.php on line 99

Warning: Invalid argument supplied for foreach() in /var/www/html/xataface-1.1.5r2/Dataface/RecordGrid.php on line 159


And it tells me there is only 1 entry to import! Is it possible to import such a large data set?

Charles

PostPosted: Thu Sep 24, 2009 2:46 am
by Jean
Are you sure your separators are OK ? comma or semi-colon ?
Jean

PostPosted: Thu Sep 24, 2009 6:05 am
by cbrunet
Yes, my import function is working. Warnings are displayed because I set display_errors to 1. But it doesn't work for large set of data because it takes too mush memory I guess. I'd need to possibility to import data from the file one line at time, reloading the page many times if needed. Maybe could it be done using AJAX into an iframe...

PostPosted: Thu Sep 24, 2009 10:53 am
by shannah
Can you post what your custom filter code looks like?