Problem/Motivation

When updating Drupal core from version 9.3.9 to version 9.3.12,
an error appeared when editing a user using the admin panel.

Steps to reproduce

The problem is in choosing the user's role, if you remove all checkboxes from the roles,
then the user is saved correctly. If you select any role and try to save the user, you will see a message
"An illegal choice has been detected. Please contact the site administrator. "

Proposed resolution

Found changes: in class Drupal/Core/Form/FormValidator.php line 348.
The value 'authenticated' now comes to the array with roles, which was not in Drupal version 9.3.9. And the validation works.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

IvanBrunevskiy created an issue. See original summary.

cilefen’s picture

Component: forms system » user system
Issue tags: -Drupal 9
larowlan’s picture

larowlan’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce
StatusFileSize
new264.12 KB
new177.21 KB

Can you please provide steps to reproduce the issue starting from 'install drupal'

I tested this in umami and had no such issue

I suspect there's a contrib module in the mix here

ukcolumn’s picture

This has happened to me as well. No idea how it happened, but in my case the reason was that the 'authenticated user' role had disappeared. It was gone from our staging and production servers. It was not gone from my dev box.

Sorry I can't offer any explanation at this point what caused the problem in the first place, but you might check to make sure that is not your problem as well.

cilefen’s picture

Is anyone affected using SQL Server?

alexdoma’s picture

I have worked on the project with topic starter. We have lost role authenticated user more than year ago after updates and etc. And now we havent such role on our roles list.

larowlan’s picture

Category: Bug report » Support request
IvanBrunevskiy’s picture

The problem is solved by adding the "Authenticated user" role. I noticed that this role was removed on my project 3 years ago and everything worked correctly until the last update of the Drupal core.

larowlan’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for reporting back

alexdoma’s picture

Status: Fixed » Needs work

Before closing this issue i want to get some information.
Role authenticated was removed(3 years ago by git history) by our developer. Last 3 years everything works correctly.
1) Why Drupal validate this deleted role on user save action?
2) Why i can delete this role if this make no sense? i will delete role but inside drupal this role is hardcoded.

alexdoma’s picture

Status: Needs work » Fixed

I will marked issue as fixed.
Because we cant delete this roles via roles page.
but we can delete it via removing yml file from configuration.

Status: Fixed » Closed (fixed)

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