Gogs crashes after copying home.tmpl into custom/templates/ #7951
Labels
💊 bug
Something isn't working
Content-Length: 216369 | pFad | http://github.com/gogs/gogs/issues/7951
C9Fetched URL: http://github.com/gogs/gogs/issues/7951
Alternative Proxies:
Gogs version
0.13.2
Git version
Operating system
Debian 12
Database
SQLite 3
Describe the bug
When I copy home.tmpl into custom/templates/, and then restart Gogs, it produces the following error:
`panic: template: home:1351: function "className" not defined
goroutine 1 [running]:
html/template.Must(...)
html/template/template.go:368
gopkg.in/macaron%2ev1.compile({{0xc00004ecc0, 0x18}, {0xc0009067e0, 0x1, 0x1}, {0x0, 0x0}, {0xc0003e8ae0, 0x2, 0x2}, ...})
gopkg.in/macaron.v1@v1.4.0/render.go:291 +0x3c5
gopkg.in/macaron%2ev1.(*TemplateSet).Set(0xc00067b110, {0x15bd3d4, 0x7}, 0xc00083c000)
gopkg.in/macaron.v1@v1.4.0/render.go:317 +0x9e
gopkg.in/macaron%2ev1.renderHandler({{0xc00004ecc0, 0x18}, {0xc0009067e0, 0x1, 0x1}, {0x0, 0x0}, {0xc0003e8ae0, 0x2, 0x2}, ...}, ...)
gopkg.in/macaron.v1@v1.4.0/render.go:384 +0x158
gopkg.in/macaron%2ev1.Renderer({0xc00098f258?, 0xc000712280?, 0xc000046420?})
gopkg.in/macaron.v1@v1.4.0/render.go:421 +0x14f
gogs.io/gogs/internal/cmd.newMacaron()
gogs.io/gogs/internal/cmd/web.go:124 +0xb6c
gogs.io/gogs/internal/cmd.runWeb(0xc000572b00)
gogs.io/gogs/internal/cmd/web.go:171 +0xaa
github.com/urfave/cli.HandleAction({0x13b0f80?, 0x2766748?}, 0x3?)
github.com/urfave/cli@v1.22.16/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0x15b6811, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x15d100c, 0x10}, {0x0, ...}, ...}, ...)
github.com/urfave/cli@v1.22.16/command.go:175 +0x67c
github.com/urfave/cli.(*App).Run(0xc000485340, {0xc00011c870, 0x3, 0x3})
github.com/urfave/cli@v1.22.16/app.go:277 +0xb3b
main.main()
gogs.io/gogs/gogs.go:39 +0x3ec`
I have not yet made any changes to home.tmpl.
To reproduce
Expected behavior
Should start without issue.
Additional context
I want to personalize the landing page for our organization. The instructions at https://gogs.io/docs/features/custom_template say to copy the content of template file "templates/home.tmpl" to "custom/templates/home.tmpl", but there is no "templates/home.tmpl". So I'm downloading it from github instead.
Code of Conduct
The text was updated successfully, but these errors were encountered: