pull requests 500 #7311

Closed
opened 2025-11-02 07:22:38 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @ghostman-git on GitHub (May 8, 2021).

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

Originally created by @ghostman-git on GitHub (May 8, 2021). v1.14.1 MySQL docker ![image](https://user-images.githubusercontent.com/13376074/117520109-3a8cc480-afd9-11eb-91ce-43ce053a4d2a.png) 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
Author
Owner

@lunny commented on GitHub (May 8, 2021):

This should be fixed in 1.14

@lunny commented on GitHub (May 8, 2021): This should be fixed in 1.14
Author
Owner

@ghostman-git commented on GitHub (May 8, 2021):

This should be fixed in 1.14

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

@ghostman-git commented on GitHub (May 8, 2021): > This should be fixed in 1.14 This is also happening now in v1.14.1 What is the temporary solution?
Author
Owner

@zeripath commented on GitHub (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 commented on GitHub (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: ] ```
Author
Owner

@zeripath commented on GitHub (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 commented on GitHub (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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7311