I attempted to import the following (sanitized) CSV file, setting Username #1 to Fname and Username #2 to LName, and I received the following error messages, with the last two records failing to import. These fields have characters in them that were un-printable.
It'd be great if User import cleaned up these fields automatically or provided a nicer error message. I may fix this myself, I'd be interested to hear what people think it should do. Perhaps it should strip the characters out and provide a warning message that it did clean these fields.
* user warning: Duplicate entry '' for key 'name' query: INSERT INTO users (mail, timezone, status, init, pass, name, created, access) VALUES ('banswer@example.com', -18000, 1, 'banswer@example.com', '04481fb8a0fd61e277097cdf433b3775', '', 1290698567, 1290698567) in /home/drupal-6.19/modules/user/user.module on line 327.
* Unable to send e-mail. Please contact the site administrator if the problem persists.
* user warning: Duplicate entry '' for key 'name' query: INSERT INTO users (mail, timezone, status, init, pass, name, created, access) VALUES ('mpierce@example.com', -18000, 1, 'mpierce@example.com', 'ccb98af86df4bee9a3dabf6100839565', '', 1290698569, 1290698569) in /home/drupal-6.19/modules/user/user.module on line 327.
* Unable to send e-mail. Please contact the site administrator if the problem persists.
| Comment | File | Size | Author |
|---|---|---|---|
| example_user_import_failed2of3records.csv_.gz | 167 bytes | darrellduane |
Comments
Comment #1
robert castelo commentedThe question is why did we have problems with these characters?
Can Drupal handle them?
I'd imagine Drupal's Unicode support would allow it to deal with these characters.
Do they need to be converted to Unicode before importing?
Comment #2
robert castelo commentedStill an issue in 6.x-4.0.
How to strip out these problem characters?
Comment #3
gisleIn addition to adding support for Windows-1252 character encoding, #3058492: Add support for Windows-1252 character encoding also provides meaningful error messages and error handling in the imported data is not in the expected character set.
Closing this one as a duplicate - please review parent project.
Comment #4
gisle