Problem/Motivation

When I press Import users from CSV (Home->Administration->People->Import users) in the options I do not see any roles to select from. Screen shot attached. I have prepared a csv file but it cannot be uploaded - I receive error "Please select at least one role to apply to the imported user(s)."

Screenshot from comment #3:

screenshot

Steps to reproduce

Require RoleAssign extension.

Enable the RoleAssign with User CSV Import module.

Proposed resolution

Until RoleAssign with User CSV Import is fixed, you must apply the patch from #3384659: RoleAssign with User CSV Import form alter doesn't work manually to that module.

Comments

virginia.jossifova created an issue. See original summary.

gisle’s picture

Status: Active » Closed (cannot reproduce)
StatusFileSize
new8.39 KB

I am unable to reproduce this.

The screenshot below shows how it looks like on my site (running Drupal 10.0.9):

Screenshot

There has been no other reports about this, so I doubt this is caused by a bug in this module. Closing.

Feel free to repopen, provided you can describe how to reproduce this on a clean Drupal 9 or 10 installation.

bcobin’s picture

StatusFileSize
new71.76 KB

I have the same issue - this is a new install, running 10.1.5 on a pretty bare bones installation. Clearing caches has no effect.

I thought perhaps that roles needed to first be enabled at admin/people/roleassign - no such luck.

@virginia - were you able to solve this? This is the one issue holding up site launch for me... thanks!

UPDATE: Sorry - just saw the issue at https://www.drupal.org/project/user_csv_import/issues/3384659

Let's see if the patch works...

gisle’s picture

Category: Support request » Bug report
Issue summary: View changes
Status: Closed (cannot reproduce) » Active

Since there is now a second report, and a clearer screenshot, I am reopening this. I've added the screenshot from comment #3 to the issue summary.

However, as maintainer I am still not able to reproduce.

This is my testing environment:

  • User CSV Import: 2.0.3
  • Drupal: 10.1.5 (no extensions except this one)
  • PHP: 8.2.10
  • OS: Ubuntu 22.04 LTS

Not being able to reproduce makes it impossible for me to debug this.

Any further information, such as error logs, may be helpful.

bcobin’s picture

Thanks for the quick response!

The patch in https://www.drupal.org/project/user_csv_import/issues/3384659 does, indeed, work.

I have a different issue now - emails fail to be imported. I see this has been reported here and is fixed on the dev version:

https://www.drupal.org/project/user_csv_import/issues/3308074

Question: should I remove the patch and install the dev version? Or should I install the dev version, keeping the patch?

Thanks for the help!

gisle’s picture

I take it that you're using this module with RoleAssign with User CSV Import (so it wasn't so much a bare bones installation after all).

I am now looking into the connection between this bug and #3384659: RoleAssign with User CSV Import form alter doesn't work.

To be able to use the module with RoleAssign with User CSV Import, as well as importing the emails, you need to:

  1. Install the dev-version.
  2. Patch RoleAssign with User CSV Import with the patch from #3384659: RoleAssign with User CSV Import form alter doesn't work.

I need to do some more testing, and after finishing that, I hope I shall be able to commit an updated dev-version with both fixes included.

bcobin’s picture

OK - thanks for taking care of all this! The dev version with the patch works, but with a proviso:

The Drupal 7 system view puts Name and email in a single column; when exported, email is in its own column, but without a column heading. Email isn't imported unless table header is added and it has to be "mail" (lower case.)

I haven't had success importing Active status, Roles, Member for and Last access, even with all headers lower case. It's only 60 users, so I suppose I could plow through, but it would be nice.

Will check back... thanks much!

gisle’s picture

Component: User interface » Code
Status: Active » Fixed

The patch in #3384659: RoleAssign with User CSV Import form alter doesn't work is now committed to the latest 2.0.x-dev snapshot, and should fix this as well.

As for the other things mentioned in comment #7, if you want those addressed, please file a separate bug report.

Also: please be clear about what the problems are. It would be helpful to see an example of a CSV-file you don't think imports correctly.

gisle’s picture

Version: 2.0.3 » 2.0.x-dev

It is not been fixed in release 2.0.3, but in 2.0.x-dev. Setting correct version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.