Skip to Content Skip to Menu

Cannot import row because: Username in use

11 months 3 weeks ago - 11 months 3 weeks ago #335582 by Intellitech
Cannot import row because: Username in use was created by Intellitech
Hi I am trying to update only certain fields in my CB user database and have followed the CB Operations Guide and Forum posts on Importing Users.
Steps:
  1. Exported DB from site using CB export
  2. Deleted the columns that are not to be changed
  3. Left ID, Name, Username, Email + the fields that are manually cleared to prepare for renewals
  4. When I import the CSV with settings Override Existing Entries with Records Matching IDs and Ignore Emails for New Entries, I get the error Cannot import row 1 etc because: Username in use. It impacts every row I am trying to import.
I should add that none of these users are logged in to the site or backend.
Pls help! Thanks.
Last edit: 11 months 3 weeks ago by Intellitech.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
11 months 3 weeks ago #335606 by krileon
Replied by krileon on topic Cannot import row because: Username in use
It sounds like the usernames you've set for those import rows match existing usernames on the site. Seams to be working fine in my tests. Maybe an encoding problem altered the usernames when editing the CSV? Note since you're just doing this to update existing users you only need the id column and whatever columns you're trying to change.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

11 months 3 weeks ago - 11 months 3 weeks ago #335629 by Intellitech
Replied by Intellitech on topic Cannot import row because: Username in use
Ys, I did try to include only the ID columns but it prompted me that username, name or email was missing! Inserting only columns for either username, name or email still prompted same message.
Yesterday: I did a CSV export, saved as an Excel to make the changes and then saved back as CSV. Would that have caused encoding issues?
Today, I exported as CSV, updated relevant fields and saved as CSV then tried to import - see image 1 for error 
2nd test, deleted username and then tried to import - see image 2 for error
3rd test, deleted username and email and tried to import - see image 3 for error
4th test, deleted name, username and email only User ID - see image 4 for error

What is the issue pls?
Attachments:
Last edit: 11 months 3 weeks ago by Intellitech.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
11 months 3 weeks ago #335637 by krileon
Replied by krileon on topic Cannot import row because: Username in use

Ys, I did try to include only the ID columns but it prompted me that username, name or email was missing!

That means it's trying to create new users instead of edit existing.

Yesterday: I did a CSV export, saved as an Excel to make the changes and then saved back as CSV. Would that have caused encoding issues?

Yes. Your issue is probably an encoding one. You need to use the below settings.

1. Character set: UTF-8
2. Separated by Comma
3. Format quoted fields as text
4. " as string delimiter

If these aren't used the raw CSV file won't be saved correctly and won't parse correctly. We provide XML and JSON export/import as well so you might want to consider a different format if you can't get your editor to open it correctly. The above work out of the box with LibreOffice. I do not own MS Excel to test if it opens correctly immediately or if further settings need adjusted.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

11 months 3 weeks ago #335653 by Intellitech
Replied by Intellitech on topic Cannot import row because: Username in use
Thanks but to be clear, the subsequent tests were ALL direct CSV to CSV as explained. Could you advice why these errors would occur with direct export and import?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
11 months 3 weeks ago #335655 by krileon
Replied by krileon on topic Cannot import row because: Username in use
You mean you edited the CSV files in a text editor? What program are you using to edit the CSV?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum