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

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

Closed
2 of 7 tasks
sigma-frossignol opened this issue Mar 9, 2020 · 10 comments
Closed
2 of 7 tasks

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

sigma-frossignol opened this issue Mar 9, 2020 · 10 comments
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Milestone

Comments

@sigma-frossignol
Copy link

sigma-frossignol commented 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.

@sigma-frossignol
Copy link
Author

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

@alangarrison-cbts
Copy link

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

@alangarrison-cbts
Copy link

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.

@jolheiser
Copy link
Member

jolheiser commented 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?

@techknowlogick
Copy link
Member

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?

@alangarrison-cbts
Copy link

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
Copy link

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
Copy link

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).

@sigma-frossignol
Copy link
Author

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

@guillep2k guillep2k added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Mar 10, 2020
@guillep2k guillep2k added this to the 1.11.3 milestone Mar 10, 2020
@guillep2k
Copy link
Member

Should be fixed by #10684. Closing.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

No branches or pull requests

5 participants