Closed (fixed)
Project:
Importer
Version:
7.x-1.0-rc2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2011 at 18:15 UTC
Updated:
9 Dec 2013 at 14:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kartelusm commentedCould you tell me the name of the table? Also, if it's not to much trouble, attach a sample of the data so I could debug the problem.
Comment #2
andjules commentedSure, I'll send you a PM
Comment #3
andjules commentedscratch that, PMs don't have attachments.
tables were (automagically named) import_dailynav and import_weeklynav, where dailynav.csv and weeklynav.csv were the filenames (attached - .csv extension changed to .txt for upload). I manually entered field names in both cases, and it was smart enough to ignore the first row of weeklynav.csv.
Comment #4
kartelusm commentedI've tried to import weeklynav (also added custom column names), and everything went well. The thing I did with that file was to remove the extra one (or two) lines at the end that were empty. Then it worked perfectly and the 'List of previously created tables' showed the import_weeklynav table (import_ is a prefix that is added to the tables created trough this module).
The dailynav file has no header. You have to have a header (even if only the ,,, sequence) because the module expect it to be present. It determines the number of columns in the table by the number of elements in the header. For instance, the ,,, will create 4 empty fields on the first step of the import so you can enter the names of the columns
Comment #5
andjules commentedThanks. that's fantastic info.
Given that the client or a 3rd party may be uploading my files, could we make it more fault-tolerant, at least of the empty lines at the end?
Comment #6
kartelusm commentedI'm planning to do something like that just as soon as I find a little time. I'll try to do it as soon as I can.
Comment #7
joelstein commentedThis error is due to MySQL returning the "SHOW TABLES LIKE" syntax with a different column name than what Importer currently expect. It's a subtle difference, but supposing your database is called "drupal", MySQL will return the table names in a column called "Tables_in_drupal (import\_%". Thus, simply changing our "t" to "T" will fix this error and populate the list of previously created tables. See the attached patch.
Comment #8
joelstein commentedComment #9
joelstein commentedFixed: https://drupal.org/commitlog/commit/13582/a80a7a4b377c0ab16cd24f108c50ee...