Skip to content
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

pull requests 500 #15783

Closed
ghostman-git opened this issue May 8, 2021 · 4 comments
Closed

pull requests 500 #15783

ghostman-git opened this issue May 8, 2021 · 4 comments
Milestone

Comments

@ghostman-git
Copy link

v1.14.1
MySQL
docker

image

2021/05/07 16:15:19 ...outers/repo/issue.go:264:issues() [E] GetIssuesLastCommitStatus: object does not exist [id: refs/pull/1604/head, rel_path: ]
2021/05/07 16:15:19 ...s/context/context.go:194:HTML() [E] Render failed: template: repo/issue/list:88:23: executing "repo/issue/list" at <eq .ViewType "all">: error calling eq: incompatible types for comparison

@lunny
Copy link
Member

lunny commented May 8, 2021

This should be fixed in 1.14

@ghostman-git
Copy link
Author

This should be fixed in 1.14

This is also happening now in v1.14.1
What is the temporary solution?

@zeripath
Copy link
Contributor

zeripath commented May 8, 2021

OK so the second error is appearing on this line:

								<a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>

and at the eq .ViewType "all" test - which means most likely that .ViewType is not set.

Now, routers/repo/issue.go:Issues() and in particular the function issues(...) is the place that this should have been set.

Now the only way that happens is if there has been a ServerError call before it - and looking at Issues(...) we see that the call from issues(...) doesn't check if the context is written before attempting to render the template.

So there is at least one bug here that needs a further fix.


That means the real issue is:

2021/05/07 16:15:19 ...outers/repo/issue.go:264:issues() [E] GetIssuesLastCommitStatus: object does not exist [id: refs/pull/1604/head, rel_path: ]

@zeripath zeripath added this to the 1.14.2 milestone May 8, 2021
@zeripath
Copy link
Contributor

zeripath commented May 8, 2021

Which is fixed by #15716 and its backport #15715 .

Therefore this issue is fixed and will be in 1.14.2 which is very soon to be released - but I will fix the issue that I've noted above.

@zeripath zeripath closed this as completed May 8, 2021
zeripath added a commit to zeripath/gitea that referenced this issue May 8, 2021
lunny pushed a commit that referenced this issue May 9, 2021
6543 pushed a commit to 6543-forks/gitea that referenced this issue May 9, 2021
zeripath added a commit that referenced this issue May 9, 2021
…15798)

Fix issue noted in #15783

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: zeripath <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants