gitea: Wiki template error with golang 1.14
- Gitea version (or commit ref): 1.11.1
- Git version: 2.24.1
- Operating system: Docker Alpine 3.11
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
When building an image (not the official one) with golang:alpine (which, as of now, points to 1.14.0-alpine3.11), trying to view a wiki page result on a blank html page with this error from the template engine :
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
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 :
apk --no-cache add \
build-base \
git \
nodejs \
npm \
&& \
git clone --single-branch --branch "v${GITEA_VERSION}" --depth 1 'https://github.com/go-gitea/gitea' && \
cd gitea && \
make clean build
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Remove unnecessary parentheses in template Fix #10552 — committed to zeripath/gitea by zeripath 4 years ago
- Remove unnecessary parentheses in template (#10583) Fix #10552 Co-authored-by: Lauris BH <lauris@nix.lv> — committed to go-gitea/gitea by zeripath 4 years ago
- 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... — committed to Jehops/freebsd-ports-legacy by assistcontrol 4 years ago
- 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... — committed to freebsd/freebsd-ports by deleted user 4 years ago
- 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... — committed to freebsd/freebsd-ports by assistcontrol 4 years ago
- MFH: r531612 r531613 r533935 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 Submitte... — committed to freebsd/freebsd-ports by assistcontrol 4 years ago
- gitea: build package with go 1.13 as gitea 1.11 does not support go 1.14 This repairs the gitea wiki on NixOS 20.03. See https://github.com/go-gitea/gitea/issues/10552 for upstream issue. — committed to florianjacob/nixpkgs by florianjacob 4 years ago
- Remove unnecessary parentheses in wiki/revision template This fixes the error on "Page Revision" page, similar to #10552. — committed to pvgoran/gitea by pvgoran 4 years ago
- Remove unnecessary parentheses in wiki/revision template (#11481) This fixes the error on "Page Revision" page, similar to #10552. — committed to go-gitea/gitea by pvgoran 4 years ago
So go 1.14 has an issue with preempting and that there’s likely another fix needed to prefix calls with GODEBUG=asyncpreemptoff=1
@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.
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?
@guillep2k Thanks I’ll rebuild with go 1.13.
Edit: that worked. Thanks.