"Save changes" button is disabled if invalid value for Project name is saved
Summary
Save changes button is disabled if Project name is filled with an invalid character, '(' for example. It requires a reload of the page in order to enable the functionality back again.
Steps to reproduce
- Input the invalid character in Project name—I have tried '(' and ')'.
- Click on "Save changes"
This will show the error message. Now as you fix the error, Save changes button will not be enabled back again, even if you input a valid name or the same name as it was.
Reload the page, and the button will be working just fine.
I checked browser console, and there are no issues in the console.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
Bug exists regardless of whether project is new, has content, or the number of members it has. Also, this happens in the hosted version—I have not tried it in the on-premise version.
https://gitlab.com/afzaal-ahmad-zeeshan/test-project
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
"Save changes" button is disabled, and never enabled back based on the current value in Project name field in Project settings.
What is the expected correct behavior?
"Save changes" button should be enabled/disabled based on the current value of Project name and not based on what was input earlier.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Here are the screenshots for what happens:
I am saving the title (and it lets me save it)—although the title is invalid.

Now it shows the error message and the button is disabled:

Even when the correct title is provided, the error stays.

Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
I believe the bug has to be in this file, https://gitlab.com/gitlab-org/gitlab/blob/master/app/controllers/projects_controller.rb.