Skip to content

On dashboard feed, avatar func create nil exeption #13883

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

Closed
2 of 6 tasks
wanhuasong opened this issue Dec 7, 2020 · 7 comments · Fixed by #13909
Closed
2 of 6 tasks

On dashboard feed, avatar func create nil exeption #13883

wanhuasong opened this issue Dec 7, 2020 · 7 comments · Fixed by #13909
Labels
Milestone

Comments

@wanhuasong
Copy link

wanhuasong commented Dec 7, 2020

  • Gitea version (or commit ref): latest docker image comment 1.14.0+dev-325-gf74a094fd
  • Git version: ignore
  • Operating system: ignore
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I upgrade from gitea/gitea@sha256:daf33224f2a2b186eb8de97814c1d1934038c2ba08627dca5967109cae3f2829(1.13.0+dev-276-g217647f33) to gitea/gitea:latest(1.14.0+dev-325-gf74a094fd), appeared follow problem when I visit the index page of selfhosted gitea

template: user/dashboard/feeds:4:5: executing "user/dashboard/feeds" at <avatar .ActUser>: error calling avatar: runtime error: invalid memory address or nil pointer dereference

Screenshots

screenshots shows content above

@lunny lunny added the type/bug label Dec 7, 2020
@lunny
Copy link
Member

lunny commented Dec 7, 2020

It may related with #13649

@techknowlogick
Copy link
Member

Do you use custom templates?

@6543 6543 added this to the 1.14.0 milestone Dec 8, 2020
@6543 6543 changed the title Upgrade error On dashboard feed, avatar func create nil exeption Dec 8, 2020
@6543
Copy link
Member

6543 commented Dec 8, 2020

we have to look why .ActUser is nil & make the avatar function resistant against nil argument ...
cc @silverwind

@silverwind
Copy link
Member

Hmm, might have something to do with a.loadActUser() which the previous implementation did call but the current one doesn't.

https://github.com/go-gitea/gitea/pull/13649/files#diff-94580350088fd8ad06447d2eb73bc35e1fd2372f11078a0f9142038808328d13L145

@silverwind
Copy link
Member

May need to introduce a avatarByAction that does this .loadActUser(). Are there any steps to reproduce the issue? It didn't show up during my testing.

silverwind added a commit to silverwind/gitea that referenced this issue Dec 8, 2020
@silverwind
Copy link
Member

#13909

lafriks pushed a commit that referenced this issue Dec 9, 2020
@wanhuasong
Copy link
Author

Fixed, thanks.

@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.

5 participants