-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Holding the values in form when the post request is failed with error #22833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems that we don't have the same naming convention to these variables. gitea/routers/web/repo/repo.go Lines 130 to 157 in 29aea36
To fix this issue, I think a naming convention is required. Then make some small changes to e.g. For all variables in context data, capitalizing the first letter of each word and join them with |
I could agree with you (at least partially) In history, people come and go, no strict rules nor guidelines, various code gets merged, many framework designs and mechanisms get broken .... So, a strong (long-term) team with strict and reliable review workflow could help, that's a trade-off. I think things can get better. |
The document is renewing under https://docs.gitea.com/. I will try to make a preview PR which will fix this in a better way. |
Uh oh!
There was an error while loading. Please reload this page.
Description
At first, I found that some vaules in the form were missing or changed to default values automaticly, when creating an org or a repo with invalid name.

e.g.
Visibility
in this page is required so users will be aware of the change.But if there are some no required params with this bug, user may post wrong data with no awareness of these changes.
Then I found func
AssignForm
in modules/web/middleware/binding.go which is used to assign form values back to the template data.It seems we need to define same variable names between form data and template data?
e.g.
Visibility
in this page is defined asDefaultOrgVisibilityMode
in template data, butvisibility
in form data.Gitea Version
87261f3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None
The text was updated successfully, but these errors were encountered: