"The value you selected is not a valid choice"

Created on 29 August 2019, about 5 years ago
Updated 29 August 2024, 22 days ago

"The value you selected is not a valid choice"

This error sometimes come from uninstalled language. So, please add more detail which SELECT LIST/OPTIONS caused this error.

Steps to reproduce:

  1. Install Drupal 10+ with a different locale except English, like en-gb
  2. Uninstall the language module later
  3. Attempt to save user 1 for example
🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Node system 

Last updated about 12 hours ago

No maintainer
Created by

🇮🇩Indonesia drupalnesia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom scott_euser

    In case someone comes across this, I managed to reproduce this by:

    1. Install Drupal 10+ with a different locale than English like en-gb
    2. Uninstall the language module later
    3. Attempt to save user 1 for example
    4. Error "The value you selected is not a valid choice" is shown because uninstalling language/locale does not update user field data table to set all users back to 'en' (for example)

    Solutions in that case:

    1. Re-enable language module and leave just single language, accepting it needs to be there
    2. Update user field data table with an update hook to reset all users back to 'en'

    Fine to stay closed I think, just posting in case its helpful for anyone in the future stumbling across this.

  • Status changed to Needs work 23 days ago
  • 🇺🇸United States mlncn Minneapolis, MN, USA

    This somehow happened to us on an up-to-date Drupal 10 site. I would say this is a bug report in that:

    • It is possible to break your site in an important way (people cannot change their password or other things on their profile, and the administrator cannot either!) by installing and configuring, and uninstalling, all core modules. (Per scott_euser's excellent recreation.)
    • The error message provides zero indication what the actual problem is. I was very lucky to find this issue.
  • Hi,
    I am not able reproduce the issue in the Drupal 10.x and also 11.x.

    Steps Followed:

    1. Install Drupal with the different language English-british or other language in the installation.
    2. Uninstall the language module
    3. Tried to update the any user
    4. Able to save the user information in the edit page.

    kindly let me know incase if i missing any steps for the reproduce.

Production build 0.71.5 2024