[Bug] Import from CSV fails when "New Headings Found"

janon

New Member
Simple Test Case:

-Create List, everything default
-Goto [View Data] and then [Import from CSV]
-Select a simple ANSI csv file ie:
Code:
"CSVExample"
"somedata"

You get the New headings found form, at this point it doesn't matter what option you select, hitting [Continue] will ultimately fail. An added side effect is the addition of a invalid phantom list displaying in Lists.

I took a quick snoop, and when makeTableFromCSV() ultimately gets called in import.php, the variables its expecting to work with are not accessible:
ie
db_table_name = ""
fabrik_list = 0

I'm guessing the phantom list that is created is a result from some functions not checking if the db_table_name is not an empty string.
 

Attachments

  • ImportCSV-1.png
    ImportCSV-1.png
    38.6 KB · Views: 340
  • ImportCSV-2.png
    ImportCSV-2.png
    38.8 KB · Views: 344
  • ImportCSV-3.png
    ImportCSV-3.png
    55.5 KB · Views: 331
Not quite sure it's the same problem but
my file on the form
Code:
"field1heading";"field2heading";"field3heading"
"Record1field1";"Record1field2";"Record1field3"
"Record2field1";"Record2field2";"Record2field3"
...
got the same error with unicode, and the 1st excel-option, but only for my first field, so I removed "??" from the file using a hex-editor and got it to work.

Saved the file as ANSI-encoded, and the same error with the CSV-option. The 2nd Excel-option worked though.

It would be nice to have a preview of the import, almost like the error-page, showing the field and a sample of the data, just to make sure the data is valid before going through with the import.
 
I think I have fixed this issue now. The changes should be available in github

-Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top