Migration from Gogs: many wiki pages not working anymore #1777

Closed
opened 2025-11-02 04:12:57 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @jeantoulza on GitHub (May 11, 2018).

  • Gitea version (or commit ref): 1.4.1
  • Git version: 2.7.4
  • Operating system: Ubuntu Trusty
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

I just migrated from Gogs to Gitea following this guide: https://docs.gitea.io/en-us/upgrade-from-gogs/.
Everything worked well, all data have been kept, except SOME wiki pages. Not quite understanding why some work and some do not.

I can see all my old (created on Gogs) pages in Gitea, but once I click to open one, I get redirected to <repo>/wiki/_pages.

My supposition is that every wiki page that had a space character in the title before migration has stopped working. Wiki pages with space character in title DO work if created from Gitea. The ones that did not have a space DO work too.

The URL for a non-working page is: <repo>/wiki/OpenVPN-tun0-sur-LXC
The URL for a working page is: <repo>/wiki/OpenVPN
The URL for a working page with space but created in Gitea instead of Gogs: <repo>/wiki/ceci-est-un-test

I can git clone the wiki repo fine, and all my pages are there, but it's really unpratical having to clone the wiki repo to read a single page.

Have I done something wrong?

Screenshots

image

Originally created by @jeantoulza on GitHub (May 11, 2018). - Gitea version (or commit ref): 1.4.1 - Git version: 2.7.4 - Operating system: Ubuntu Trusty - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description I just migrated from Gogs to Gitea following this guide: https://docs.gitea.io/en-us/upgrade-from-gogs/. Everything worked well, all data have been kept, except SOME wiki pages. Not quite understanding why some work and some do not. I can see all my old (created on Gogs) pages in Gitea, but once I click to open one, I get redirected to `<repo>/wiki/_pages`. My supposition is that every wiki page that had a space character in the title before migration has stopped working. Wiki pages with space character in title DO work if created from Gitea. The ones that did not have a space DO work too. The URL for a **non-working** page is: `<repo>/wiki/OpenVPN-tun0-sur-LXC` The URL for a **working** page is: `<repo>/wiki/OpenVPN` The URL for a **working** page with space but created in Gitea instead of Gogs: `<repo>/wiki/ceci-est-un-test` I can `git clone` the wiki repo fine, and all my pages are there, but it's really unpratical having to clone the wiki repo to read a single page. Have I done something wrong? ## Screenshots ![image](https://user-images.githubusercontent.com/5441867/39924480-37251cac-5528-11e8-880b-651ce430f5dc.png)
GiteaMirror added the reviewed/wontfix label 2025-11-02 04:12:57 -06:00
Author
Owner

@lunny commented on GitHub (May 11, 2018):

maybe it's the different name handling between Gogs and Gitea? Or maybe it's a bug of Gitea?

@lunny commented on GitHub (May 11, 2018): maybe it's the different name handling between Gogs and Gitea? Or maybe it's a bug of Gitea?
Author
Owner

@jeantoulza commented on GitHub (May 11, 2018):

I'm not sure.
UPDATE: I have set log threshold to Trace and nothing wrong popped in the logs, only the 302 HTTP redirection to _pages.

@jeantoulza commented on GitHub (May 11, 2018): I'm not sure. UPDATE: I have set log threshold to Trace and nothing wrong popped in the logs, only the 302 HTTP redirection to _pages.
Author
Owner

@lafriks commented on GitHub (May 11, 2018):

can you try to replace spaces with - for one of .md files and see if that fixes problems with that wiki page

@lafriks commented on GitHub (May 11, 2018): can you try to replace spaces with `-` for one of `.md` files and see if that fixes problems with that wiki page
Author
Owner

@jeantoulza commented on GitHub (May 11, 2018):

I'm not sure how to do it.
I tried to clone the wiki repo and modify the filename then commit the change but it failed to push due to remote: Gogs: Branch 'master' is protected and you are not in the push whitelist.

Is there another way to change the filenames?

EDIT: I just noticed that the .md files created on Gitea with a space in title have a - in their name instead of a space like Gogs had. Pretty sure your solution is the right one, but I must figure how to edit the filename now...
image

RE-EDIT: Okay it seems that the problem is something else, as I cannot push on a regular repository anymore due to the branch being 'protected' despite it is not in the web interface...

@jeantoulza commented on GitHub (May 11, 2018): I'm not sure how to do it. I tried to clone the wiki repo and modify the filename then commit the change but it failed to push due to `remote: Gogs: Branch 'master' is protected and you are not in the push whitelist`. Is there another way to change the filenames? EDIT: I just noticed that the `.md` files created on Gitea with a space in title have a `-` in their name instead of a space like Gogs had. Pretty sure your solution is the right one, but I must figure how to edit the filename now... ![image](https://user-images.githubusercontent.com/5441867/39935563-b9499160-5549-11e8-856b-315abd0c6936.png) RE-EDIT: Okay it seems that the problem is something else, as **I cannot push on a regular repository anymore due to the branch being 'protected' despite it is not in the web interface**...
Author
Owner

@jeantoulza commented on GitHub (May 17, 2018):

Update: I managed to finally push on the wiki repo using git push. The error message was resolved and was completely unlinked to this issue.

Renaming OpenVPN tun0 sur LXC.md to OpenVPN-tun0-sur-LXC.md fixed the issue. But I need to do that for every wiki page which is okay for me because I don't have many repositories, but it could be an issue for larger organizations...

@jeantoulza commented on GitHub (May 17, 2018): Update: I managed to finally push on the wiki repo using `git push`. The error message was resolved and was completely unlinked to this issue. Renaming `OpenVPN tun0 sur LXC.md` to `OpenVPN-tun0-sur-LXC.md` fixed the issue. But I need to do that for every wiki page which is okay for me because I don't have many repositories, but it could be an issue for larger organizations...
Author
Owner

@lafriks commented on GitHub (May 17, 2018):

There is not much we can do about it as Gitea is doing this way for compatibility with GitHub wiki behaviour so supporting such Gogs behaviour is out of scope.

Best option in such case is to clone all wiki repos and rename all .md files with spaces in them either manually or using bash script to automate this. If anyone creates one we would accept it in contrib for others to help with such problem

@lafriks commented on GitHub (May 17, 2018): There is not much we can do about it as Gitea is doing this way for compatibility with GitHub wiki behaviour so supporting such Gogs behaviour is out of scope. Best option in such case is to clone all wiki repos and rename all `.md` files with spaces in them either manually or using bash script to automate this. If anyone creates one we would accept it in `contrib` for others to help with such problem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1777