Disabling disable avatar breaks Gitea #11927

Closed
opened 2025-11-02 09:51:59 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @batkuip on GitHub (Oct 29, 2023).

Description

Disabling Disable Gravatar in configuration broke Gitea for me. All pages give me:

Render failed, failed to render template: user/dashboard/dashboard, error: template error: builtin(bindata):base/head_navbar:146:7 : executing "base/head_navbar" at <avatar $.Context .SignedUser 24 "gt-mr-2">: error calling avatar: runtime error: invalid memory address or nil pointer dereference
----------------------------------------------------------------------
					{{avatar $.Context .SignedUser 24 "gt-mr-2"}}
					  ^
----------------------------------------------------------------------

Gitea Version

1.20.5

Screenshots

image

How are you running Gitea?

docker compose

Database

MySQL/MariaDB

Originally created by @batkuip on GitHub (Oct 29, 2023). ### Description Disabling Disable Gravatar in configuration broke Gitea for me. All pages give me: ``` Render failed, failed to render template: user/dashboard/dashboard, error: template error: builtin(bindata):base/head_navbar:146:7 : executing "base/head_navbar" at <avatar $.Context .SignedUser 24 "gt-mr-2">: error calling avatar: runtime error: invalid memory address or nil pointer dereference ---------------------------------------------------------------------- {{avatar $.Context .SignedUser 24 "gt-mr-2"}} ^ ---------------------------------------------------------------------- ``` ### Gitea Version 1.20.5 ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/110234/b99f2126-c7aa-406b-a779-03ba6ed509e3) ### How are you running Gitea? docker compose ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 09:51:59 -06:00
Author
Owner

@lunny commented on GitHub (Nov 2, 2023):

I can reproduce this only once but cannot repeat it never.

@lunny commented on GitHub (Nov 2, 2023): I can reproduce this only once but cannot repeat it never.
Author
Owner

@wxiaoguang commented on GitHub (Dec 29, 2023):

There are many new refacotrings for these code. So I guess there might be no problem in 1.21

@wxiaoguang commented on GitHub (Dec 29, 2023): There are many new refacotrings for these code. So I guess there might be no problem in 1.21
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11927