Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.3k
Fix issue filter#34914
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix issue filter#34914
Uh oh!
There was an error while loading.Please reload this page.
Conversation
wxiaoguang commentedJun 30, 2025
a94e472 intogo-gitea:mainUh oh!
There was an error while loading.Please reload this page.
`0` is zero value and won't be put into query parameter by QueryBuildFixgo-gitea#34913
wxiaoguang commentedJun 30, 2025
Manually backported then no need to wait for the bot. It seems the for most time the bot only does the backport then main branch gets another push. |
* giteaofficial/main: Fix modal + form abuse (go-gitea#34921) [skip ci] Updated translations via Crowdin Follow file symlinks in the UI to their target (go-gitea#28835) Fix issue filter (go-gitea#34914) Fix: RPM package download routing & missing package version count (go-gitea#34909) Add support for 3D/CAD file formats preview (go-gitea#34794)
| </div> | ||
| <divclass="divider"></div> | ||
| <aclass="{{ifnot $.MilestoneID}}active selected{{end}}item"href="{{QueryBuild $queryLink"milestone"0}}">{{ctx.Locale.Tr"repo.issues.filter_milestone_all"}}</a> | ||
| <aclass="{{ifnot $.MilestoneID}}active selected{{end}}item"href="{{QueryBuild $queryLink"milestone"NIL}}">{{ctx.Locale.Tr"repo.issues.filter_milestone_all"}}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why do we writeNIL as uppercase? Shouldn't it work asnil too?
wxiaoguangJul 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No, Golang team's strange decision. Template can't use "nil", so we use our template helper function NIL
Maybe related to
https://github.com/golang/go/issues/58326
https://github.com/golang/go/issues/57773
silverwindJul 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We do have a few cases of lowercasenil in the templates, and I recall they work:
templates/repo/file_info.tmpl:7: {{if ne .NumLines nil}}templates/repo/file_info.tmpl:12: {{if ne .FileSize nil}}templates/repo/issue/view_content.tmpl:8: {{ctx.AvatarUtils.Avatar nil 40}}templates/repo/issue/view_content/comments.tmpl:21: {{ctx.AvatarUtils.Avatar nil 40}}templates/repo/diff/comments.tmpl:6: <span>{{ctx.AvatarUtils.Avatar nil}}</span>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's different. Official document and issue have explained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The real example is:
{{$var := nil}}, it fails. We have to use{{$var := NIL}}
…h/gitea into feature/enhanced-workflow-runs-api* 'feature/enhanced-workflow-runs-api' of github.com:bdruth/gitea: [skip ci] Updated translations via Crowdin Follow file symlinks in the UI to their target (go-gitea#28835) Fix issue filter (go-gitea#34914) Fix: RPM package download routing & missing package version count (go-gitea#34909) Add support for 3D/CAD file formats preview (go-gitea#34794) Add a `login`/`login-name`/`username` disambiguation to affected endpoint parameters and response/request models (go-gitea#34901) Improve tags list page (go-gitea#34898) [skip ci] Updated translations via Crowdin docs: fix typo in pull request merge warning message text (go-gitea#34899) Refactor container package (go-gitea#34877) [skip ci] Updated translations via Crowdin


0is zero value and won't be put into query parameter by QueryBuildFix#34913