Closed (fixed)
Project:
Node import
Version:
5.x-1.9
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2008 at 10:32 UTC
Updated:
25 Dec 2008 at 11:24 UTC
I've found that a csv file with newlines in any fields will cause an incorrect import. As in, there will be an incorrect number of final fields for each "row" that is called by fgets, as well as each row with a newline in one of it's fields having incorrect starting and stopping points for it's fields after the newline field. I saw the code there that should make this work and add the next line to the string operated on for the row, but it doesn't work.
I hacked node_import.module to make this work for my project. I have scraped about 10,000 webpages to import into drupal as nodes, so this is imperative to me to make it work correctly.
Attaching my patch...
| Comment | File | Size | Author |
|---|---|---|---|
| node_import.module.patch | 1.81 KB | jbizzay |
Comments
Comment #1
sutharsan commentedI ran into the same situation. The patch works like a charm!
Changing the priority, this patch is a must!
Comment #2
joachim commented+1
Same problem, patch works perfectly. Thanks for your work -- saved me a big headache!
Could the maintainer please commit & make a new release please?
Comment #3
zach harkey commentedHALLELUJAH !!!
Thank you jasonalank!
+1
Tested. Works. This patch is critical.
Comment #4
elly commentedHiya - I have a CSV file with line breaks and this patch isn't really working for me. Does anyone have any tips or tricks? I'm trying to import my old blog so I have lots of body fields with newlines. Node import seems to be reading each chunk of text between a newline as its own item. I don't get why this patch isn't working!
Comment #5
Robrecht Jacques commentedFixed. Will be included in next release of node_import (5.x-1.7) released later today.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
myudkowsky commentedAlthough the patch is present in 5.x-1.9, import of a file with newlines does not work: #351009: Multi-line Import Fails (csv contains newlines).
For example, using the module's test/node.csv, each line of the multi-line body is treated as the start of a new record.