go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.6k stars 5.45k forks source link

panic: template: admin/user/edit:89: function "DisableGitHooks" not defined #2666

Closed strk closed 7 years ago

strk commented 7 years ago

Description

Running ./gitea web after building it with go build -tags bindata results in panic:

2017/10/06 13:39:07 [I] Run Mode: Development
panic: template: admin/user/edit:89: function "DisableGitHooks" not defined

goroutine 1 [running]:
panic(0x1162f00, 0xc420409d90)
        /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
html/template.Must(0x0, 0x1a8e9c0, 0xc420409d90, 0x0)
        /usr/lib/go-1.7/src/html/template/template.go:340 +0x66
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.compile(0x1297b0b, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc42017d420, 0x2, 0x2, ...)
        /home/strk/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/render.go:292 +0x4bd
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*TemplateSet).Set(0xc4202b8060, 0x129195e, 0x7, 0xc42093a1e0, 0x0)
        /home/strk/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/render.go:318 +0x63
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.renderHandler(0x1297b0b, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc42017d420, 0x2, 0x2, ...)
        /home/strk/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/render.go:385 +0x1b4
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.Renderer(0xc42034cf08, 0x1, 0x1, 0x1a95ec0, 0xc42017d3e0)
        /home/strk/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/render.go:422 +0x172
code.gitea.io/gitea/modules/templates.Renderer(0xc4202a8b80, 0x1141bc0)
        /home/strk/go/src/code.gitea.io/gitea/modules/templates/static.go:116 +0xf7a
code.gitea.io/gitea/routers/routes.NewMacaron(0xc42018d400)
        /home/strk/go/src/code.gitea.io/gitea/routers/routes/routes.go:74 +0x319
code.gitea.io/gitea/cmd.runWeb(0xc42018d400, 0x0, 0x0)
lafriks commented 7 years ago

Did you regenerate bindata first?

strk commented 7 years ago

Oops, nope. Good catch !

I'm missing a "Building" section in the README.md (damn github turned every README into a markup hell of a webpage0