-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
/admin/default-hooks/gitea/new 500 #22154
Comments
It would be helpful if the provided logs were as text rather than a screenshot, as the screenshot has slightly cut off the salient part of the error message. From the bit I can tell there is a template error with some property HeaderAuthorization being missing on the some struct provided to the template (likely a struct named hook given the context) |
Which was added in #20926 - but this is 1.19 only... OUTDATEDThe erroring router is here: gitea/routers/web/repo/webhook.go Lines 119 to 154 in 998fe26
We can see that the .Webhook property is set to a models/webhook.Webhook struct and if we look at: gitea/models/webhook/webhook.go Lines 408 to 415 in 998fe26
We see that there is very definitely a function on that struct for header authorization. ~~But note the comment on the function - which I think may be the cause of all of the problems. I suspect this should just be a pointer receiver and at worst we change the router to send a pointer to ctx.Data. ~~
There is no HeaderAuthorization in 1.18 - you're using a template from 1.19/main in 1.18 and that is why you have this problem. |
Yes, I got it , you are right。thinks When I replace the setting.tmpl file with the template of v1.18 library, everything returns to normal, In fact, the problem is caused by the use of github's main branch template by the way , gitea/gitea:latest , Is it 1.18 actually ? and If I want to render the domain , I should use the built-in global template variable of gitea? |
The docker tag In the templates, you're correct that BTW you can use the |
Description
verversion: 1.18.0+rc1
Gitea Version
1.18.0+rc1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Database
SQLite
The text was updated successfully, but these errors were encountered: