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

gitea docker image have bugs #13516

Closed
vtolstov opened this issue Nov 11, 2020 · 22 comments · Fixed by #13619
Closed

gitea docker image have bugs #13516

vtolstov opened this issue Nov 11, 2020 · 22 comments · Fixed by #13619
Labels

Comments

@vtolstov
Copy link

"Id": "sha256:79bdd2b180885b6f7ef56cabf78201b7a3afc86f4cc74f3ccd23b8ed56a4c446",
"gitea/gitea@sha256:8f59c1e816313418824ad171bc349e9843e527a4b1c1ff6f2f462a9d4987fae3"

template: repo/issue/view_content/comments:189:105: executing "repo/issue/view_content/comments" at <RenderLabels .AddedLabels>: error calling RenderLabels: runtime error: invalid memory address or nil pointer dereference

issue had some labels attached , as i understand this related to kanban board changes, i'm move issues to in progress board.
issues without attaching to project does not have this problem

@6543 6543 added the type/bug label Nov 11, 2020
@vtolstov
Copy link
Author

docker[442729]: 2020/11/12 07:34:21 ...els/issue_comment.go:383:LoadLabel() [W] Commit 705 cannot load label 0

@vtolstov
Copy link
Author

i'm not delete any labels and this issue with error not displayed in kanban board =(

@vtolstov
Copy link
Author

@lunny can you helps with this? Mostly i cant work with around 20issues in my repo now because of such error.

@lunny
Copy link
Member

lunny commented Nov 14, 2020

@vtolstov Do you have customize templates? And what's the Gitea version of the docker?

@vtolstov
Copy link
Author

I dont customize any templates, but have custom label set.
Gitea 1.14.0+dev-200-g0ae35c66f

@vtolstov
Copy link
Author

I have one template for mermeid footer.tmpl thats adds javascript code.

@lunny
Copy link
Member

lunny commented Nov 14, 2020

It seems this cannot be reproduced in https://try.gitea.io which will always follow the latest docker image.

@6543
Copy link
Member

6543 commented Nov 14, 2020

wasn't mermeid integrated?

@6543
Copy link
Member

6543 commented Nov 14, 2020

I ... have custom label set.

can you show us how they look like?

@vtolstov
Copy link
Author

vtolstov commented Nov 14, 2020 via email

@vtolstov
Copy link
Author

vtolstov commented Nov 14, 2020 via email

@6543
Copy link
Member

6543 commented Nov 14, 2020

ok this file works ... so it should not cause any issue on your side too

@vtolstov
Copy link
Author

vtolstov commented Nov 14, 2020 via email

@vtolstov
Copy link
Author

i'm copy template from git to custom templates dir and remove block for labels from 189 line. now issue is displayed
but as you see - in labels i have empty lines, may be issue have some labels that not present now?

@vtolstov
Copy link
Author

download

@vtolstov
Copy link
Author

for example:

"RenderLabels": func(labels []*models.Label) template.HTML {                                         
  html := ""                                                                                         
                                                                                                     
  for _, label := range labels {                                                                     
    html = fmt.Sprintf("%s<div class='ui label' style='color: %s; background-color: %s'>%s</div>",   
      html, label.ForegroundColor(), label.Color, RenderEmoji(label.Name))                           
  }                                                                                                  
                                                                                                     
  return template.HTML(html)                                                                         
},                                                                                                   

receives nil Label, so func try to dereference nil struct field and crushes?

@vtolstov
Copy link
Author

i'm dump label table from db and it looks strange - it contains duplicate label names...
https://gist.github.com/vtolstov/d5599c4f383a5b8047a5f7669110aa9e

@lunny
Copy link
Member

lunny commented Nov 16, 2020

@vtolstov For different repository, the duplicated labels are allowed. For one repository, that should be not.

@vtolstov
Copy link
Author

@vtolstov For different repository, the duplicated labels are allowed. For one repository, that should be not.

Ok, what next?as i understand problem on labels some label not valud struct pointer and accesd to member fails

@lunny
Copy link
Member

lunny commented Nov 16, 2020

This maybe related with #13304

@lunny
Copy link
Member

lunny commented Nov 16, 2020

@vtolstov
Copy link
Author

any chance to get this fixed ? =)

@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants