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

Render failed, failed to render template: user/profile #27473

Closed
HeikoDressler opened this issue Oct 6, 2023 · 5 comments
Closed

Render failed, failed to render template: user/profile #27473

HeikoDressler opened this issue Oct 6, 2023 · 5 comments
Labels

Comments

@HeikoDressler
Copy link

Description

on click to my Profile i got the following error:

Ein Fehler ist aufgetreten:

Render failed, failed to render template: user/profile, error: template error: builtin(bindata):shared/user/profile_big_avatar:86:87 : executing "shared/user/profile_big_avatar" at <.HasMemberWithUserID>: wrong number of args for HasMemberWithUserID: want 1 got 2

				{{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID ctx $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
				                                                                                  ^

image

Gitea Version

1.21.0+rc0-69-g44aca6a65

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

2.37.1, Wire Protocol Version 2 Enabled

Operating System

Windows Server 2022 Standard

How are you running Gitea?

self hosting

Database

MSSQL

@silverwind
Copy link
Member

#27417 is related, but maybe the fix there was wrong? @delvh

@silverwind
Copy link
Member

silverwind commented Oct 6, 2023

The function takes 1 argument on 1.21 branch but two on 1.22, so the backport was incorrect:

func (org *Organization) HasMemberWithUserID(userID int64) bool {

func (org *Organization) HasMemberWithUserID(ctx context.Context, userID int64) bool {

@delvh
Copy link
Member

delvh commented Oct 6, 2023

Erm… Could it be that we didn't backport the refactoring PR before it and thus the backport was unnecessary?

@silverwind
Copy link
Member

Yes, likely missed one backport with the function refactoring.

@delvh
Copy link
Member

delvh commented Oct 6, 2023

Hmm… Does reverting work for someone else on #27426? I only get a 500 on that page…

lunny pushed a commit that referenced this issue Oct 6, 2023
Apparently, we didn't backport one of the refactoring PRs which caused
the fixup we backported to fail.

Fixes: #27473
@lunny lunny closed this as completed Oct 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants