Can't view Wiki pages after upgrade from 1.11.1 to 1.11.2 #5031

Closed
opened 2025-11-02 06:11:54 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @sigma-frossignol on GitHub (Mar 9, 2020).

  • Gitea version (or commit ref): 1.11.2
  • Git version: 2.25.1
  • Operating system: Windows 2016
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When trying to view a Wiki page I've got this message

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

Upgraded from 1.11.1 to 1.11.2 this morning and the problem appeared.
When downgrading back to 1.11.1 the problem disapears.

I had a custom template (footer.tmpl for mermaid.js) even when removing the custom template the problem persists.

I tried on a repo without Wiki, clicked start wiki saved the default page and got the message.

Originally created by @sigma-frossignol on GitHub (Mar 9, 2020). - Gitea version (or commit ref): 1.11.2 - Git version: 2.25.1 - Operating system: Windows 2016 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant ## Description When trying to view a Wiki page I've got this message ``` 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 ``` Upgraded from 1.11.1 to 1.11.2 this morning and the problem appeared. When downgrading back to 1.11.1 the problem disapears. I had a custom template (footer.tmpl for mermaid.js) even when removing the custom template the problem persists. I tried on a repo without Wiki, clicked start wiki saved the default page and got the message.
GiteaMirror added the topic/build label 2025-11-02 06:11:54 -06:00
Author
Owner

@sigma-frossignol commented on GitHub (Mar 9, 2020):

Might be related to #10552 which shows the same error message and is said to be fixed by #10583

@sigma-frossignol commented on GitHub (Mar 9, 2020): Might be related to #10552 which shows the same error message and is said to be fixed by #10583
Author
Owner

@alangarrison-cbts commented on GitHub (Mar 9, 2020):

I am also getting this message when creating a new wiki page, just upgraded from 1.10.3 to 1.11.2.

@alangarrison-cbts commented on GitHub (Mar 9, 2020): I am also getting this message when creating a new wiki page, just upgraded from 1.10.3 to 1.11.2.
Author
Owner

@alangarrison-cbts commented on GitHub (Mar 9, 2020):

A little more detail in my instance: In a repo with no Wiki pages, adding a new page loads the editor as expected. I get the error when saving the page, however when I go back to the Wiki page listing the page does appear to be created as it does show up. I get the template error again trying to read the new page.

@alangarrison-cbts commented on GitHub (Mar 9, 2020): A little more detail in my instance: In a repo with no Wiki pages, adding a new page loads the editor as expected. I get the error when saving the page, however when I go back to the Wiki page listing the page does appear to be created as it does show up. I get the template error again trying to read the new page.
Author
Owner

@jolheiser commented on GitHub (Mar 9, 2020):

This should indeed be fixed by #10583, though that fix was for Go 1.14 and Gitea 1.12, so it was never backported.
I'm unsure why this is happening in 1.11.2 since that should still be built with Go 1.13(.8), unless perhaps the bug was older than we thought?
@zeripath @techknowlogick Thoughts?

@jolheiser commented on GitHub (Mar 9, 2020): This should indeed be fixed by #10583, though that fix was for Go 1.14 and Gitea `1.12`, so it was never backported. I'm unsure why this is happening in `1.11.2` since that should still be built with Go 1.13(.8), unless perhaps the bug was older than we thought? @zeripath @techknowlogick Thoughts?
Author
Owner

@techknowlogick commented on GitHub (Mar 9, 2020):

How did you get the binary for 1.11.2, did you build it yourself? What is the output of http://gitea.example/admin/config for the Gitea Version line (it should say which version of golang is in use)? Could you try adding the fix from the linked PR to a custom template to see if that resolves the issue for you?

@techknowlogick commented on GitHub (Mar 9, 2020): How did you get the binary for 1.11.2, did you build it yourself? What is the output of http://gitea.example/admin/config for the `Gitea Version` line (it should say which version of golang is in use)? Could you try adding the fix from the linked PR to a custom template to see if that resolves the issue for you?
Author
Owner

@alangarrison-cbts commented on GitHub (Mar 9, 2020):

How did you get the binary for 1.11.2, did you build it yourself?

Downloaded "gitea-1.11.2-linux-amd64" from github.

What is the output of http://gitea.example/admin/config for the Gitea Version line (it should say which version of golang is in use)?

1.11.2 built with GNU Make 4.1, go1.14 : bindata, sqlite, sqlite_unlock_notify

Could you try adding the fix from the linked PR to a custom template to see if that resolves the issue for you?

Will try shortly.

@alangarrison-cbts commented on GitHub (Mar 9, 2020): > How did you get the binary for 1.11.2, did you build it yourself? Downloaded "gitea-1.11.2-linux-amd64" from github. > What is the output of http://gitea.example/admin/config for the `Gitea Version` line (it should say which version of golang is in use)? 1.11.2 built with GNU Make 4.1, go1.14 : bindata, sqlite, sqlite_unlock_notify > Could you try adding the fix from the linked PR to a custom template to see if that resolves the issue for you? Will try shortly.
Author
Owner

@alangarrison-cbts commented on GitHub (Mar 9, 2020):

Confirmed, using this line:
{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
on line 48 of view.tmpl (per the PR) does fix the problem on my instance.

@alangarrison-cbts commented on GitHub (Mar 9, 2020): Confirmed, using this line: `{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}` on line 48 of view.tmpl (per the PR) does fix the problem on my instance.
Author
Owner

@alangarrison-cbts commented on GitHub (Mar 9, 2020):

I got the same kind of error clicking on a wiki page's Revision, and grepping around the source it looks like the same kind of change will need to be made in revision.tmpl (assuming that's the proper fix).

@alangarrison-cbts commented on GitHub (Mar 9, 2020): I got the same kind of error clicking on a wiki page's Revision, and grepping around the source it looks like the same kind of change will need to be made in revision.tmpl (assuming that's the proper fix).
Author
Owner

@sigma-frossignol commented on GitHub (Mar 9, 2020):

Downloaded gitea-1.11.2-windows-4.0-amd64.exe from https://dl.gitea.io/gitea/1.11.2/

Gitea version is 1.11.2 built with GNU Make 4.1, go1.14 : bindata, sqlite, sqlite_unlock_notify

@sigma-frossignol commented on GitHub (Mar 9, 2020): Downloaded gitea-1.11.2-windows-4.0-amd64.exe from https://dl.gitea.io/gitea/1.11.2/ Gitea version is `1.11.2 built with GNU Make 4.1, go1.14 : bindata, sqlite, sqlite_unlock_notify`
Author
Owner

@guillep2k commented on GitHub (Mar 10, 2020):

Should be fixed by #10684. Closing.

@guillep2k commented on GitHub (Mar 10, 2020): Should be fixed by #10684. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5031