i am doing a lengthy import (thanks to geocoding) and I am getting no feedback on screen. it would be nice to flush progress to screen
i am doing a lengthy import (thanks to geocoding) and I am getting no feedback on screen. it would be nice to flush progress to screen
Comments
Comment #1
Robrecht Jacques commentedThe new FAPI has a nice "file-upload" widget. We could use something like that to show the progress. But I'll need to check how that works.
Good idea though.
Comment #2
dado commentedsounds like a good idea. i also think it might be helpful for us to show more info on screen. perhaps we should output a teaser or title of each node we import, so the user can see progress & monitor for problems as the import happens. An abort this import button might be helpful also. the abort this import could update a session variable to tell it to stop importing. the node_import import code would have to check that session variable before impoirting each node. something like that. sorry for the scope creep of this issue. what do you think?
Comment #3
Robrecht Jacques commentedI think this would be great. Beside the file-upload widget, we could also check out the way update.php works, this has a nice progressbar too.
Progressbar, cancel, showing preview during import, ... all very nice features.
I'll await your patch :-)
Or rather: I'll check how to do this kind of stuff next week, after fixing the issues still remaining.
Comment #4
dado commentedRobrecht,
My apologies that I am not delivering some of these things. Currently delivering on a year long project. "Deadline" is end of next week (or 2). I will be a tad limited in my time to deliver much new code for a few weeks. I do very much appreciate your time & all that you have accomplished so quickly.
Naturally, I should have mentioned that many of these feature requests can wait for a later release. The cancel button or flushing progress to screen should be pretty easy.
dado
Comment #5
Robrecht Jacques commentedNo problem. It is a feature request and a minor one. So this has low priority, but would be nice to have. Can be added later. I realised that.
Comment #6
dado commentedImporting and things are looking good. The 2nd biggest issue that I see is the lack of reporting to screen as to progress. In particular, I find that the act of importing can be ugly, since many data sources people will want to import have imperfect data, perhaps with a missing field (shifting all values over) or missing data. I believe it would be best to output all importing progress to screen so the results can be carefully examined. The teaser that shows up in the preview screen would be perfect compromise (in my opinion) between showing complete node for purposes of troubleshooting and showing too much on screen.
I embrace progress bars as cool, but I personally want more nuts and bolts. Bottom line, I believe that showing all such progress info to screen will result in net fewer errors in the importing process.
But that's just me. If you concur Robrecht then I can go ahead & add code to do this.
Perhaps a good compromise would be to have configurable option in the form.
Comment #7
Robrecht Jacques commentedI concur :-)
I've been thinking about this. A way to avoid timeout trouble is to have a AJAX solution, just like update.php. What I was thinking about is the following:
- file-upload (probably also with a progress bar just like upload.module does);
- immediately read the CSV file and put it in a {node_import_rows} table (columns: filename, row_no, csv_columns (the data), status, nid) - we could validate the CSV file (each row has to have an equal amount of columns);
- do the field mapping (as is now);
- do the global fields (I would like to move this to a seperate page on in the wizard);
- do the preview (easy to select the first X rows from the table) and show them like now (unlikely to have a timeout);
- for the import: return a page which is actually a AJAX page which requests an update;
- the server-side of this AJAX solution would import exactly one row, set the status to 'error' or 'ok' (if 'ok' then it would save the nid of the created node in the node_import_rows.nid column), and return the HTML code of the preview of the imported node;
- the client-side of this AJAX would show the progress, show the preview of the last imported node (as given from the server-side) and would ask the server to do the next node.
The AJAX script would allow a "cancel" operation if one sees things are "wrong". The "download rows with errors" is also easy to find. And probably also a "delete imported rows" operation if one wants to start allover. The "delete file from server" operation would clean out the {node_import_rows} table.
A bit of work, but I have the time this week to implement it.
The progressbar is "cool", but I think it is needed to avoid possible server timeout trouble if one is importing a very large file.
What do you think?
Comment #8
dado commentedwow. that would be awesome. i fully support your ideas (but don't have time now to help alas).
Comment #9
Robrecht Jacques commentedSee also:
Comment #10
Robrecht Jacques commentednode_import-6.x-1.0-RC2 has a progress bar. It could still be improved, but setting it as fixed. This will not be back-ported to 5.x.