I've been trying to use the latest -dev version to important a taxonomy with about 2,000 entries. I have two columns in the file (term name and term description). But when I try to do the import, the module only imports the first row in the file... that's it.

I've tried various import formats the module providers, but I can still only get the first row of any file to import.

Any ideas?

Thanks,
Ben

Comments

Daniel_KM’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Strange behaviour...

Dev version is the same as the major version (only a little update today), so you don't need to use dev release.

You have to set format to "Term descriptions", of course. Check your file and the third group of option (Windows or Linux end of line ?, specific separator or enclosure ?, non-utf8 format ?).

You can try copy and paste all the content of your file.

Don't you have more info?

Sincerely,

Daniel Berthereau
Knowledge manager

opdavies’s picture

I had (I think) the same problem. What I needed to do was to open the .csv file, remove any trailing commas from each line, save it, and then attempt to upload it again. Worked for me. :)

milplus’s picture

sirs I have a similar problem

I need to upload a big csv file with + 2000 items

as per below

01 Engine;0100 Engine and Mounting Parts;1;1-1;1;BOLT,MACHINE;10884988;4
01 Engine;0100 Engine and Mounting Parts;1;1-1;2;WASHER.LOCK;MS35338-47;8

I need to get as a result of importation a taab with multiple rows and as many column separated by ; .

however with csv import MODULE I cannot find the proper way to do this.

the below is the result I shall like to get in Drupal

01 Engine 0100 Engine and Mounting Parts 1 1-1 1 BOLT,MACHINE 10884988 4
01 Engine 0100 Engine and Mounting Parts 1 1-1 2 WASHER.LOCK MS35338-47 8
01 Engine 0100 Engine and Mounting Parts 1 1-1 3 SCREW,CAP.HEXAGON H MS90727-88 4
01 Engine 0100 Engine and Mounting Parts 1 1-1 4 WASHER.FLAT MS27183-16 2
01 Engine 0100 Engine and Mounting Parts 1 1-1 5 MOUNT,RESILIENT REAR PART OF KIT P/N 5702254 8754676 2

split by column

thaaks

milplus’s picture

sirs I have a similar problem

I need to upload a big csv file with + 2000 items

as per below

01 Engine;0100 Engine and Mounting Parts;1;1-1;1;BOLT,MACHINE;10884988;4
01 Engine;0100 Engine and Mounting Parts;1;1-1;2;WASHER.LOCK;MS35338-47;8

I need to get as a result of importation a taab with multiple rows and as many column separated by ; .

however with csv import MODULE I cannot find the proper way to do this.

the below is the result I shall like to get in Drupal

01 Engine 0100 Engine and Mounting Parts 1 1-1 1 BOLT,MACHINE 10884988 4
01 Engine 0100 Engine and Mounting Parts 1 1-1 2 WASHER.LOCK MS35338-47 8
01 Engine 0100 Engine and Mounting Parts 1 1-1 3 SCREW,CAP.HEXAGON H MS90727-88 4
01 Engine 0100 Engine and Mounting Parts 1 1-1 4 WASHER.FLAT MS27183-16 2
01 Engine 0100 Engine and Mounting Parts 1 1-1 5 MOUNT,RESILIENT REAR PART OF KIT P/N 5702254 8754676 2

split by column

thanks

Daniel_KM’s picture

Hi,

Normally, trailing commas are automatically removed by the module. Any additional columns are removed too if chosen format doesn't require them. For example, import of "term descriptions" needs only two columns, the term and the description:

term 1, description of the term 1
term 2, description of the term 2

In your example, I don't understand what terms and descriptions are: Do you want that codes ("01", "0100", "1 1-1 1", "1 1-1 2"...) would be terms and words be description ("Engine", "Engine and Mounting Parts", "Bolt", "Washer"...)? Or code and word would be terms ("01 Engine", "0100 Engine and Mounting Parts"...)? Or something else? If you use commas in your terms or in your descriptions, you must use an enclosure, normally quotation marks (" " ").

In fact, your example looks like a tree:

01 Engine
|- 0100 Engine and Mounting Parts
| |- 1 1-1 1 BOLT,MACHINE 10884988 4
| |- 1 1-1 2 WASHER.LOCK MS35338-47 8
| |- 1 1-1 3 SCREW,CAP.HEXAGON H MS90727-88 4
| |- 1 1-1 4 WASHER.FLAT MS27183-16 2
| |- 1 1-1 5 MOUNT,RESILIENT REAR PART OF KIT P/N 5702254 8754676 2
|
|- 0101...
|
02 ...

Are the last portions of your lines the description ("MACHINE 10884988 4", "LOCK MS35338-47 8"...)? In that case, you should proceed in two times: first import the tree of terms (without descriptions), and next descriptions (without the tree). Note that Drupal 7 allows only one description by term. If you need special fields, you need to create them and to indicate your format in fields.

Sincerely,

Daniel Berthereau
Infodoc & knowledge management

Daniel_KM’s picture

Status: Postponed (maintainer needs more info) » Fixed

Hi,

Last releases correct some issues and probably yours.

Sincerely,

Daniel Berthereau
Infodoc & knowledge management

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

johnish’s picture

MAC USERS:
If it will only import the first line then you need to change the line breaks to Unix.

  1. Open the file in Text Wrangler
  2. File -> Save As
  3. Choose the Line Break: "Unix (LF)" and Encoding: "Unicode (UTF-8)"
  4. Save

This worked for me and I hope it works for you.

leistiko_texvet’s picture

FWIW: Copy-and-pasting the file instead of pointing the import tool at the file is what worked for me. It was a significant quantity of text (Every term from the LA 211 Taxonomy.) – I was surprised that it handled it, but it did fine.

Jonathan L.