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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot_20220507-064055.png | 177.21 KB | larowlan |
| #4 | Screenshot_20220507-064048.png | 264.12 KB | larowlan |
Comments
Comment #2
cilefen commentedComment #3
larowlanComment #4
larowlanCan 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
Comment #5
ukcolumn commentedThis 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.
Comment #6
cilefen commentedIs anyone affected using SQL Server?
Comment #7
alexdoma commentedI 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.
Comment #8
larowlanComment #9
IvanBrunevskiy commentedThe 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.
Comment #10
larowlanThanks for reporting back
Comment #11
alexdoma commentedBefore 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.
Comment #12
alexdoma commentedI 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.