importX icon indicating copy to clipboard operation
importX copied to clipboard

Import error

Open greengoatmedia opened this issue 14 years ago • 8 comments

Mark,

I've tried everything to import this file and I keep getting this error:

Console Console running... Running pre-import tests on submitted data... CSV file upload overriding any manual input. Filename: test-csv-format.csv No errors in pre-import found. Preparing import values... FATAL ERROR: Element count do not match. Please check for correct syntax on line 5.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

greengoatmedia avatar Dec 14 '11 15:12 greengoatmedia

It did import when I copied your csv directly into the RAW csv window?

greengoatmedia avatar Dec 14 '11 15:12 greengoatmedia

That error means that not all of the lines (in this case line 5) has the same amount of elements.

Ie, this could cause that error:

pagetitle;template;menutitle;content;
Howdy-doodles!;2;Menu;This be my content, but wait; it has a semi-colon in it!;
Howdy2;3;Menu

In the first line there's a semi-colon in the content that ticks it off. The second line misses the last element entirely.

If you could upload/show the first lines perhaps I can find what's causing the issue, but it's likely an error in the file.

Mark-H avatar Dec 14 '11 16:12 Mark-H

Looking into it more Mark before I get you involved. I was able to import using the RAW CSV window, but the fields that were TV related did't populate, the field that was pagetitle populated. I'll mess around a bit more. You're example showing all field types and associated example above helps by the way. I'd include that in your ZIP. Such that if you want to use a specific template you use just the ID.

Also, I was using a | (pipe) delimiter. Does it matter?

greengoatmedia avatar Dec 14 '11 16:12 greengoatmedia

As long as te delimiter fron the csv matches the selected delimiter in the component thats fine.

Isn't there a similar example in the ImportX docs? Op 14 dec. 2011 17:35 schreef "greengoatmedia" < [email protected]> het volgende:

Looking into it more Mark before I get you involved. I was able to import using the RAW CSV window, but the fields that were TV related did't populate, the field that was pagetitle populated. I'll mess around a bit more. You're example showing all field types and associated example above helps by the way. I'd include that in your ZIP. Such that if you want to use a specific template you use just the ID.

Also, I was using a | (pipe) delimiter. Does it matter?


Reply to this email directly or view it on GitHub: https://github.com/Mark-H/importX/issues/30#issuecomment-3144005

Mark-H avatar Dec 14 '11 16:12 Mark-H

Success, at least partial. Have to be very careful of vetting the data before importing.

There is a similar example, yes, but it didn't include the template field, which helps to know.

greengoatmedia avatar Dec 14 '11 16:12 greengoatmedia

Thanks Mark. Your always there and your tools are great.

greengoatmedia avatar Dec 14 '11 17:12 greengoatmedia

I've added some notes to the docs on the CSV.. if you can think of any more, feel free to update the docs or to let me know.

Also about TVs: you'd have to use tv4 where 4 is the ID of the TV. Thought that was in the docs but couldn't find it, so had added it to the docs as well.

Thanks!

Mark-H avatar Dec 15 '11 10:12 Mark-H

Try editing the csv file using Notepadd++ and make sure there is no empty final line. That worked for me. Did over 220 lines

nicboyde avatar Jan 13 '12 06:01 nicboyde