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

fix(config): remove context on config template #22096

Merged
merged 1 commit into from
Dec 11, 2022
Merged

fix(config): remove context on config template #22096

merged 1 commit into from
Dec 11, 2022

Conversation

restray
Copy link
Contributor

@restray restray commented Dec 10, 2022

👋 Hey
I'm new around here, so I may have done some mistakes, sorry!


Context

On a fresh Gitea install, when I go to the config admin page I had a 500 error page.
The logs:

2022/12/10 20:08:47 ...s/context/context.go:232:HTML() [E] [6394d93f] Render failed: template: admin/config:180:22: executing "admin/config" at <.Service.DefaultAllowOnlyContributorsToTrackTime>: DefaultAllowOnlyContributorsToTrackTime has arguments but cannot be invoked as function
2022/12/10 20:08:47 [6394d93f] router: completed GET /admin/config for [::1]:43800, 500 Internal Server Error in 5.1ms @ admin/config.go:99(admin.Config)

The fix

I removed the $.Context on the .Service.DefaultAllowOnlyContributorsToTrackTime to fix the 500 error page happening. It could be a mistake, and I don't fully understand what I've done!

Signed-off-by: Restray [email protected]

Remove the `$.Context` `.Service.DefaultAllowOnlyContributorsToTrackTime`
to fix the 500 error page happening on fresh install

Signed-off-by: Restray <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 11, 2022
@lunny lunny added the type/bug label Dec 11, 2022
@lunny
Copy link
Member

lunny commented Dec 11, 2022

caused by #22071

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 11, 2022
@lunny lunny merged commit 112e425 into go-gitea:main Dec 11, 2022
@restray restray deleted the fix-page-admin-config-error-500-on-fresh-install branch December 11, 2022 08:45
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 12, 2022
* giteaofficial/main:
  Use multi reader instead to concat strings (go-gitea#22099)
  Fix sorting admin user list by last login (go-gitea#22081)
  Fix wrong default value for update checker on app.example.ini (go-gitea#22084)
  fix(config): remove context on config template (go-gitea#22096)
  [skip ci] Updated licenses and gitignores
  Update xorm (go-gitea#22094)
  Remove unnecessary whitespace in snapcraft.yaml (go-gitea#22090)
  Rename almost all Ctx functions (go-gitea#22071)
  Change ID pattern of raw content container for issue (go-gitea#21966)
  Optimize html templates (go-gitea#22080)
  Add API management for issue/pull and comment attachments (go-gitea#21783)
  Rename actions to operations on UI (go-gitea#22067)
  Update go dev dependencies (go-gitea#22064)
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants