Wiki not routable if file name consists of spaces. #5065

Closed
opened 2025-11-02 06:13:01 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @furai on GitHub (Mar 15, 2020).

  • Gitea version: 1.11.3
  • Git version: 2.25.1
  • Operating system: Ubuntu 18.04
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    Irrelevant

Description

Hey,

So I've encountered the issue few versions back where one of wiki files I had wasn't opening for me in the web browser. When I was clicking it - I was being redirected to the main page of the project's wiki. I left it for few months to sit there in hopes that it would get fixed eventually with some new version.

There were no error logs, at least not ones that would tell me right away what was wrong.
I've cloned the wiki by cloning the project-name.wiki.git repo. I've noticed then that the file in question was named something like some file name.md with spaces while all other files were hyphenated.
I've moved the file with git and added hyphens and it started working right away.

I'm not sure how this happened and when it stopped working as we weren't really checking out those wiki page in ages. Maybe it was imported from gogits.

Is there anything that can be done about it? Is this a problem with gitea or with my webserver?
What if someone creates a file manually in the wiki by committing it with name containing spaces - that would for sure break again. It's more convenient for me to edit wiki files directly in the repo, so I'm sure some people would like to do that as well.

Sorry for the lengthy message.

Cheers,
Furai

Originally created by @furai on GitHub (Mar 15, 2020). - Gitea version: 1.11.3 - Git version: 2.25.1 - Operating system: Ubuntu 18.04 - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: Irrelevant ## Description Hey, So I've encountered the issue few versions back where one of wiki files I had wasn't opening for me in the web browser. When I was clicking it - I was being redirected to the main page of the project's wiki. I left it for few months to sit there in hopes that it would get fixed eventually with some new version. There were no error logs, at least not ones that would tell me right away what was wrong. I've cloned the wiki by cloning the `project-name.wiki.git` repo. I've noticed then that the file in question was named something like `some file name.md` with spaces while all other files were hyphenated. I've moved the file with git and added hyphens and it started working right away. I'm not sure how this happened and when it stopped working as we weren't really checking out those wiki page in ages. Maybe it was imported from gogits. Is there anything that can be done about it? Is this a problem with gitea or with my webserver? What if someone creates a file manually in the wiki by committing it with name containing spaces - that would for sure break again. It's more convenient for me to edit wiki files directly in the repo, so I'm sure some people would like to do that as well. Sorry for the lengthy message. Cheers, Furai
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 06:13:01 -06:00
Author
Owner

@furai commented on GitHub (Mar 15, 2020):

Actually, I've reproduced it on try.gitea.io
https://try.gitea.io/Furai/test-repository/wiki/_pages
Here you can see test and test test wiki pages. The latter one won't open.

@furai commented on GitHub (Mar 15, 2020): Actually, I've reproduced it on try.gitea.io https://try.gitea.io/Furai/test-repository/wiki/_pages Here you can see `test` and `test test` wiki pages. The latter one won't open.
Author
Owner

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

Just in case others get confused like me, this is not related to links inside the wiki content, but the page listing generated by Gitea.

@guillep2k commented on GitHub (Mar 17, 2020): Just in case others get confused like me, this is not related to links inside the wiki content, but the page listing generated by Gitea.
Author
Owner

@wxiaoguang commented on GitHub (Apr 25, 2023):

It should have been fixed by https://github.com/go-gitea/gitea/pull/24143

But, you need to enter the titles in Web UI, Gitea has its own naming rules.

@wxiaoguang commented on GitHub (Apr 25, 2023): It should have been fixed by https://github.com/go-gitea/gitea/pull/24143 But, you need to enter the titles in Web UI, Gitea has its own naming rules.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5065