Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps taken:
- create new installation with Jan. 8th HEAD
- create first user account
- change password for admin user, or otherwise submit the user/1/edit screen
On the user/1/edit screen the error message
Roles field is required.
is given due to the admin user not automatically having any roles.
This begs the question: do we solve the error by giving the admin user a role (authenticated user) or by making the admin user impervious to this check? I'd think the second option would be the better.
Comment | File | Size | Author |
---|---|---|---|
#1 | default_role.patch | 2.65 KB | killes@www.drop.org |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI'd prefer the first option.
INSERT INTO users_roles (uid, rid) VALUES (1, 2);
in the database files should fix it.
patch attached
I also changed the order of inserts a bit.
Comment #2
Dries CreditAttribution: Dries commentedLooks good to me. Committed to HEAD. Thanks.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedwhy does uid =1 get saved without any role? ... it is a little odd to give this user a role before he is even created. but this solution will work for now.
Comment #4
Dries CreditAttribution: Dries commented