Import csv file not work properly!

Import csv file not work properly!

SarbastSarbast Posts: 85Questions: 0Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
**Hello,
I used the importing csv file example in the editor, but there is a problem which is when click import csv button the upload file box will pop up to browse file for uploading it and after that you must select columns and click submit. Then, if I click import csv again no pop up box will appear untill refresh the page.

Also, if there is a unique field in the table and one of the csv file cell duplicate it will stop all operation and my question here is there any option to skip the duplicate and import just unique one?
Thanks in advance**:

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This thread will help with the duplicate/unique import - it's a bit of a code dump but that'll get you going.

    We'll have a look at the open issue and report back later,

    Colin

  • SarbastSarbast Posts: 85Questions: 0Answers: 0

    Many thanks colin

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    Thanks for letting us know about that. It looks like it is working in Firefox, but not Chrome. The change or input event isn't being triggered, which is why it isn't then transitioning to the column selector.

    To workaround that, in this example locate:

                        uploadEditor.create( {
                            title: 'CSV file import'
                        } );
    

    Immediately after that add:

                        uploadEditor.field('csv').input().val('');
    

    I'll get a "real" fix into Editor.

    Regards,
    Allan

  • SarbastSarbast Posts: 85Questions: 0Answers: 0

    Thanks alot allan.
    There is another bug that I found in several example and is when select all rows (about 100 rows) and then click delete button it will get an error and can't delete. Try to delete all rows in the import csv example.

    best wishes

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    That's happening due to the way our HTTP / PHP server it setup - there is a limit in the number of parameters it will accept. This article explains how to modify PHP on your server to allow more input parameters.

    Regards,
    Allan

  • SarbastSarbast Posts: 85Questions: 0Answers: 0

    Thanks alot allan

This discussion has been closed.