-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Wiki template error with golang 1.14 #10552
Comments
Problem is here: gitea/templates/repo/wiki/view.tmpl Line 48 in bea497f
The encoding parentheses on the or are unnecessary |
Fix #10552 Co-authored-by: Lauris BH <[email protected]>
The problem persists for meI upgraded go and giteea at the same time to:
I clicked the wiki link (after restarting) and got the same error as was described by @kode9 in this ticket
I had a look at the merged fix from this issue: it described removing the opening and closing parentheses on line 48 of the wiki template. I did so on my local setup. The problem persists.
Did the fix not get merged to |
@guillep2k Thanks I'll rebuild with go 1.13. Edit: that worked. Thanks. |
Any chance of this getting backported to 1.11? Some distributions (like FreeBSD) have switched to go 1.14 as a default, exposing this bug. Or what's the timeline for a 1.12 release, which presumably would be compatible with go 1.14? |
From the PR: Right now, the version of gitea shipped in ports fails to display wiki pages. Any wiki page opened results in the following error: template: repo/wiki/view:48:14: executing "repo/wiki/view" at <(not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))>: can't give argument to non-function not $.DisableHTTP This is due to extra parentheses in templates/repo/wiki/view.tmpl and has already been fixed upstream in [1], [2]. I've pulled the single line template fix from upstream and added the patch to our port. As a workaround, users can also fix the problem by placing the corrected template in /usr/local/etc/gitea/templates/repo/wiki/view.tmpl. Cheers, Sascha [1] go-gitea/gitea#10552 [2] zeripath/gitea@1830d0e PR: 246020 Submitted by: Sascha Biberhofer Approved by: maintainer git-svn-id: svn+ssh:https://svn.freebsd.org/ports/head@533935 35697150-7ecd-e111-bb59-0022644237b5
From the PR: Right now, the version of gitea shipped in ports fails to display wiki pages. Any wiki page opened results in the following error: template: repo/wiki/view:48:14: executing "repo/wiki/view" at <(not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))>: can't give argument to non-function not $.DisableHTTP This is due to extra parentheses in templates/repo/wiki/view.tmpl and has already been fixed upstream in [1], [2]. I've pulled the single line template fix from upstream and added the patch to our port. As a workaround, users can also fix the problem by placing the corrected template in /usr/local/etc/gitea/templates/repo/wiki/view.tmpl. Cheers, Sascha [1] go-gitea/gitea#10552 [2] zeripath/gitea@1830d0e PR: 246020 Submitted by: Sascha Biberhofer Approved by: maintainer git-svn-id: svn+ssh:https://svn.freebsd.org/ports/head@533935 35697150-7ecd-e111-bb59-0022644237b5
From the PR: Right now, the version of gitea shipped in ports fails to display wiki pages. Any wiki page opened results in the following error: template: repo/wiki/view:48:14: executing "repo/wiki/view" at <(not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))>: can't give argument to non-function not $.DisableHTTP This is due to extra parentheses in templates/repo/wiki/view.tmpl and has already been fixed upstream in [1], [2]. I've pulled the single line template fix from upstream and added the patch to our port. As a workaround, users can also fix the problem by placing the corrected template in /usr/local/etc/gitea/templates/repo/wiki/view.tmpl. Cheers, Sascha [1] go-gitea/gitea#10552 [2] zeripath/gitea@1830d0e PR: 246020 Submitted by: Sascha Biberhofer Approved by: maintainer
gitea: Update to 1.1.4 Update Gitea to 1.11.4 This release fixes ten bugs. Release notes: https://blog.gitea.io/2020/04/gitea-1.11.4-is-released/ PR: 245602 Submitted by: maintainer gitea: Add GIT_LFS option Add a GIT_LFS option (on by default) for environments that don't want to make LFS available. While here, change the pkg-message UCL to only show when upgrading from < 1.8.0. Approved by: maintainer gitea: Fix wiki page display From the PR: Right now, the version of gitea shipped in ports fails to display wiki pages. Any wiki page opened results in the following error: template: repo/wiki/view:48:14: executing "repo/wiki/view" at <(not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))>: can't give argument to non-function not $.DisableHTTP This is due to extra parentheses in templates/repo/wiki/view.tmpl and has already been fixed upstream in [1], [2]. I've pulled the single line template fix from upstream and added the patch to our port. As a workaround, users can also fix the problem by placing the corrected template in /usr/local/etc/gitea/templates/repo/wiki/view.tmpl. Cheers, Sascha [1] go-gitea/gitea#10552 [2] zeripath/gitea@1830d0e PR: 246020 Submitted by: Sascha Biberhofer Approved by: maintainer Approved by: portmgr (with hat)
@stblassitude 1.12.0 has entered the "feature freeze" stage. A release candidate will be out within a couple of weeks, I suppose. But these are strange days and things are not as predictible as they used to be. 😓 |
as gitea 1.11 does not support go 1.14 This repairs the gitea wiki on NixOS 20.03. See go-gitea/gitea#10552 for upstream issue.
Looks like the same problem occurs with the "Page Revision" page:
(Sorry, I'm too lazy for creation of a proper issue at the moment.) |
We don't intend to fix 1.11's templates for go 1.14 - if however you were to do the work to do this and open a PR for it I'd approve it. The only trouble is we will not build 1.11 with go1.14 so our ci would not be able to assert that your template changes were sufficient or required for 1.14. |
This fixes the error on "Page Revision" page, similar to go-gitea#10552.
@zeripath Done. |
This fixes the error on "Page Revision" page, similar to #10552.
Huh, so #11481 fixes this for 1.11.6, but this issue doesn't get merged? Any interaction with wiki pages continues to be broken when Gitea is built with Go 1.14. |
Oh... Seems like #10583 wasn't merged into release/v1.11 . |
@pvgoran #11481 is the PR you're looking for. @stblassitude it was merged 13 days ago and released yesterday: Unless I misunderstood your comments. |
@guillep2k #11481 - this one is mine, I made it after #10583, and it got merged. This fixed the problem with the Wiki revision page. However, the earlier #10583 which fixes #10552 (the problem with Wiki's view page) was not merged into the 1.11 branch. |
@pvgoran please send a backport I think we will have one more 1.11 release so we can get that in |
@zeripath Done. |
So go 1.14 has an issue with preempting and that there's likely another fix needed to prefix calls with GODEBUG=asyncpreemptoff=1 |
[x]
):Description
When building an image (not the official one) with
golang:alpine
(which, as of now, points to1.14.0-alpine3.11
), trying to view a wiki page result on a blank html page with this error from the template engine :I did no try to rebuild the official image using golang 1.14, but it works fine if I build the same image with
golang:1.13-alpine
.Also the issue was quite hard (for me) to track as there is no error in the logs even with all levels set to
trace
.I think it might be related to #5697 and #4817
Screenshots
The wiki pages
After clicking on the page
P.S Note that the build layer of my image is nothing fancy :
The text was updated successfully, but these errors were encountered: