-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Subscribers import can fail to load last line #6865
Comments
It only affects CSV files without column headers. Can you confirm? |
No, If there are no column headers you get the error - Column header missing: "email" The readline module looks for a new line - (\r, \n, \r\n) before returning 'line' which means the read stream ends but the final line is not returned. We could perhaps read the whole stream first and check/append a new line at the end then read this line by line. |
FYI: nodejs/node-v0.x-archive#7238 it's a bug in Node 0.10, fixed in 0.12 and there is a suggestion for a workaround. |
Thanks @sebgie If somebody is interested in this bug fix, pick it up 👍 |
👍 confirmed issue is resolved on node v4 |
Node 0.10 is still our recommended version and the version running on Ghost(Pro). Although that will be changing soon, I'd like to see a workaround for this go into the next release. |
closes TryGhost#6865 - switch csv-read to use a csv-parser for greater reliability and management of strings when importing a csv
closes TryGhost#6865 - switch csv-read to use a csv-parser for greater reliability and management of strings when importing a csv
Issue Summary
During a subscribers CSV import, if the CSV file does not end with a newline, the final line is not included.
Steps to Reproduce
Make a column of a few email address in Google sheets.
Download as CSV (do not modify file - many editors automatically add a line)
Import CSV on /ghost/subscribers/
Result is 1 less imported email address than the CSV
The text was updated successfully, but these errors were encountered: