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

error migrate 1.14.7 to 1.15.11 #21344

Closed
tipsang opened this issue Oct 5, 2022 · 6 comments
Closed

error migrate 1.14.7 to 1.15.11 #21344

tipsang opened this issue Oct 5, 2022 · 6 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@tipsang
Copy link

tipsang commented Oct 5, 2022

Description

I want to migrate from version 1.14.7 to 1.15.11.
The platform is well accessed but when accessing any repository I get a 500 error.
The log shows this:
Render Failed: template: repo/branch_dropdown:12:126: executing "repo/branch_dropdown" at <.root.CommitId>: invalid value; expected string
Template: status/500
What can happen?

Gitea Version

1.15.11

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

1.15.11

Operating System

windows Server

How are you running Gitea?

Windows server + SQL Server

Database

MSSQL

@wxiaoguang
Copy link
Contributor

The latest supported release is 1.17.x, please try to upgrade to 1.17.2

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Oct 5, 2022
@tipsang
Copy link
Author

tipsang commented Oct 5, 2022

The latest supported release is 1.17.x, please try to upgrade to 1.17.2

Error with 1.17.2
2022/10/05 16:19:51 cmd/web.go:95:func1() [F] PANIC: template: repo/home:67: function "EscapePound" not defined
/usr/local/go/src/html/template/template.go:374 (0x240fab5)
/go/pkg/mod/github.com/unrolled/render@v1.4.1/render.go:322 (0x240f836)
/go/pkg/mod/github.com/unrolled/render@v1.4.1/render.go:202 (0x240ebee)
/go/pkg/mod/github.com/unrolled/render@v1.4.1/render.go:146 (0x240e7c1)
/source/modules/templates/base.go:86 (0x24bf73e)
/source/routers/web/base.go:127 (0x2fbbe69)
/source/routers/web/web.go:123 (0x2fbefab)
/source/routers/init.go:174 (0x2fdeedc)
/source/cmd/web.go:177 (0x30abc66)
/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:524 (0x29ef75f)
/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 (0x29f036b)
/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277 (0x29ed333)
/source/main.go:116 (0x30e2766)
/usr/local/go/src/runtime/proc.go:250 (0x132fc00)
/usr/local/go/src/runtime/asm_386.s:1326 (0x135ce70)

@techknowlogick
Copy link
Member

Are you using custom templates?

@tipsang
Copy link
Author

tipsang commented Oct 5, 2022

Are you using custom templates?

I don't think so. How can I be sure?

@wxiaoguang
Copy link
Contributor

You must be using customized templates. https://docs.gitea.io/en-us/customizing-gitea/#customizing-gitea-pages-and-resources

Remove your customized templates then Gitea will work well.

zeripath added a commit to zeripath/gitea that referenced this issue Oct 5, 2022
There are repeated issues reported whereby users are unable to interpret
the template errors. This PR adds some (somewhat complex) error handling
to the panic recovery for template renderering but hopefully makes the
interpretation of the error easier.

Reference go-gitea#21344

Signed-off-by: Andrew Thornton <art27@cantab.net>
@wxiaoguang
Copy link
Contributor

Since it doesn't seem to be a Gitea bug, I will close this issue.

Feel free to re-open if you can reproduce it with a fresh setup and confirm it's a bug, or if you would propose some solutions for the edge cases or update the documents to help to future users to get rid of similar problems.

zeripath added a commit that referenced this issue Oct 7, 2022
There are repeated issues reported whereby users are unable to interpret
the template errors. This PR adds some (somewhat complex) error handling
to the panic recovery for template renderering but hopefully makes the
interpretation of the error easier.

Reference #21344

Signed-off-by: Andrew Thornton <art27@cantab.net>
@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
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

3 participants