Clicking new Navigation Theme option causes 422 Error
Summary
I previously changed my color theme to the alpha Dark Mode. When trying to change it back I was unable to click the radio button for the new theme without being immediately redirected to a 422 HTTP Error page.
Steps to reproduce
- (use Firefox 80.0.1 for macOS 10.15.6)
- Change user's color theme in Preferences > Navigation Theme to Dark Mode.
- Attempt to change color back.
What is the current bug behavior?
When a user clicks the "Save changes" button and triggers the submit form action on the Preferences page, a POST request is made. That POST body contains a form property called "Commit" with a value of "Save changes".
The same POST request happens when a user attempts to click a new navigation theme option, except that final property "Commit" is missing from the POST body. Leading to the 422 HTTP Error.
What is the expected correct behavior?
When a user clicks a new theme option in the Navigation theme section, the theme color should appear globally to view your change.
Relevant logs and/or screenshots
Normal body of POST /profile/preferences:
utf8=%E2%9C%93&_method=put&user%5Btheme_id%5D=1&user%5Bcolor_scheme_id%5D=1&user%5Blayout%5D=fixed&user%5Bdashboard%5D=projects&user%5Bgroup_view%5D=details&user%5Bproject_view%5D=files&user%5Brender_whitespace_in_code%5D=0&user%5Bshow_whitespace_in_diffs%5D=0&user%5Bshow_whitespace_in_diffs%5D=1&user%5Bview_diffs_file_by_file%5D=0&user%5Btab_width%5D=8&user%5Bpreferred_language%5D=en&user%5Bfirst_day_of_week%5D=&user%5Bsourcegraph_enabled%5D=0&commit=Save%20changes
Body of POST /profile/preferences that is causing the bug:
utf8=%E2%9C%93&_method=put&user%5Btheme_id%5D=11&user%5Bcolor_scheme_id%5D=1&user%5Blayout%5D=fixed&user%5Bdashboard%5D=projects&user%5Bgroup_view%5D=details&user%5Bproject_view%5D=files&user%5Brender_whitespace_in_code%5D=0&user%5Bshow_whitespace_in_diffs%5D=0&user%5Bshow_whitespace_in_diffs%5D=1&user%5Bview_diffs_file_by_file%5D=0&user%5Btab_width%5D=8&user%5Bpreferred_language%5D=en&user%5Bfirst_day_of_week%5D=&user%5Bsourcegraph_enabled%5D=0
Output of checks
This bug happens on GitLab.com