Errors importing data

A place for users and developers of the Xataface to discuss and receive support.

Errors importing data

Postby cbrunet » Wed Sep 23, 2009 5:59 pm

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
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby Jean » Thu Sep 24, 2009 2:46 am

Are you sure your separators are OK ? comma or semi-colon ?
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby cbrunet » Thu Sep 24, 2009 6:05 am

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...
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Thu Sep 24, 2009 10:53 am

Can you post what your custom filter code looks like?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved