Deleting an org avatar breaks the image #852

Closed
opened 2025-11-02 03:39:01 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @tboerger on GitHub (Jun 28, 2017).

  • Gitea version (or commit ref): 1.1.2
  • Git version: n/a
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist: n/a

Description

I have uploaded a custom avatar for my organization, afterwards I have deleted it again and than the org avatar is broken. No page is loading any avatar anymore. I would expect that I get an auto-generated Gravatar image again.

Screenshots

bildschirmfoto 2017-06-28 um 10 46 35

Originally created by @tboerger on GitHub (Jun 28, 2017). - Gitea version (or commit ref): 1.1.2 - Git version: n/a - Operating system: docker - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL): https://try.gitea.io/foobar - [ ] No - [ ] Not relevant - Log gist: n/a ## Description I have uploaded a custom avatar for my organization, afterwards I have deleted it again and than the org avatar is broken. No page is loading any avatar anymore. I would expect that I get an auto-generated Gravatar image again. ## Screenshots ![bildschirmfoto 2017-06-28 um 10 46 35](https://user-images.githubusercontent.com/156964/27628641-fb7a10d6-5bef-11e7-9c68-236c447f75c3.png)
GiteaMirror added the type/bug label 2025-11-02 03:39:01 -06:00
Author
Owner

@lunny commented on GitHub (Jun 28, 2017):

This bug maybe reproduced on master?

@lunny commented on GitHub (Jun 28, 2017): This bug maybe reproduced on master?
Author
Owner

@ethantkoenig commented on GitHub (Jun 29, 2017):

Also, after the avatar breaks, the GET /orgs/:orgname API endpoint for the organization gives a 500.

I'm guessing this is because org.RelAvatarLink() is returning an empty string, so there is an out-of-index error at https://github.com/go-gitea/gitea/blob/master/models/user.go#L361

@ethantkoenig commented on GitHub (Jun 29, 2017): Also, after the avatar breaks, the `GET /orgs/:orgname` API endpoint for the organization gives a 500. I'm guessing this is because `org.RelAvatarLink()` is returning an empty string, so there is an out-of-index error at https://github.com/go-gitea/gitea/blob/master/models/user.go#L361
Author
Owner

@tboerger commented on GitHub (Jun 29, 2017):

@lunny try.gitea.io is based on master.

@tboerger commented on GitHub (Jun 29, 2017): @lunny try.gitea.io is based on master.
Author
Owner

@lunny commented on GitHub (Jun 29, 2017):

So let's mark it as v1.2 and back port to v1.1.3

@lunny commented on GitHub (Jun 29, 2017): So let's mark it as v1.2 and back port to v1.1.3
Author
Owner

@ethantkoenig commented on GitHub (Jul 2, 2017):

@tboerger @lunny Fixed? (see https://try.gitea.io/foobar)

@ethantkoenig commented on GitHub (Jul 2, 2017): @tboerger @lunny Fixed? (see https://try.gitea.io/foobar)
Author
Owner

@lunny commented on GitHub (Jul 3, 2017):

@ethantkoenig @tboerger seems yes.

@lunny commented on GitHub (Jul 3, 2017): @ethantkoenig @tboerger seems yes.
Author
Owner

@lunny commented on GitHub (Jul 11, 2017):

@ethantkoenig please backport to v1.1

@lunny commented on GitHub (Jul 11, 2017): @ethantkoenig please backport to v1.1
Author
Owner

@lunny commented on GitHub (Jul 11, 2017):

closed by #2083

@lunny commented on GitHub (Jul 11, 2017): closed by #2083
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#852