Can't Choose File after update Group Settings fails due to Name containing special characters
Summary
This is almost identical to #29426 (closed), except this is on the Group settings of an existing group rather than during the 'Add Group' process. Basically, on updating Group Settings if you provide an image but the update failed (in my case was because I had braces in the Name) then you'll no longer be able to upload an image and the 'remove avatar' button is present.
Steps to reproduce
- Go to Settings on an existing Group which doesn't have an avatar
- Choose File to upload an avatar
- Before saving do something to trigger the error (either add special character into Name field or have the avatar be larger than 200kb)
- Save Group
- After page reloads with Error Message try to 'Choose File' and you'll find it's no longer bringing up the system finder for selecting files.
Example Group
https://gitlab.com/test-bug-garrett
- Following the 'Steps to reproduce' above I was able to reproduce the issue on Gitlab.com
What is the current bug behavior?
Currently, after the error is displayed the 'Choose File' button becomes broken and doesn't trigger the System File Chooser. Also the 'Remove avatar' button appears even though no file is evident as seen by the ? question mark.
What is the expected correct behavior?
The 'Choose File' should trigger the system file chooser and there shouldn't be a 'remove avatar' button as there's no avatar currently associated to the Group.
Relevant logs and/or screenshots
Output of checks
Confirmed this occurs on Gitlab.com
Possible fixes
In 9.2.2 Issue #29426 (closed) was resolved and this seems very similar so would start there.