Wiki Sites naming in file system #769

Closed
opened 2025-11-02 03:35:50 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @mibuthu on GitHub (Jun 4, 2017).

Description

There was a change in the way how the wiki sites with special character in the site name (e.g. spaces) are saved in the wiki git repository between 1.0 and 1.1. I know that 1.1 had some additional issues with that which were fixed in 1.1.1, but it is still not completely solved in 1.1.1 and also not in the actual master:

An example wiki entry with the site name "Test Test" was saved as "Test Test.md" in 1.0 and is saved as "Test-Test.md" since 1.1. But already existing entries from 1.0 are kept with the old name format also after the update. This makes troubles when I want to edit an old entry, I get a 500 error when I want to save the changes with the following message in the logfile:
routers/repo/wiki.go:500 EditWikiPost()] [E] EditWikiPage: Failed to remove data/tmp/local-wiki/2/Test-Test.md: remove data/tmp/local-wiki/2/Test-Test.md: no such file or directory
Additionally the url is not encoded correctly.

To reproduce this on try.gitea.io i created a new entry via the filesystem of the cloned wiki repository in the old style format with spaces, and this issue is reproducible with this. This is also another issue with the new format if someone creates a new wiki entry in this way.

You can find these examples in https://try.gitea.io/mibuthu/wiki-test/wiki.

In my opinion the old style format in the filesystem was better, but I can also go with the new one, but then at least some additional checks/changes are required and a migration for old and in-filesystem-created entries should be included.

What are your thoughts about this?

Originally created by @mibuthu on GitHub (Jun 4, 2017). - Gitea version (or commit ref): 1.1.1 and master - Git version: 2.7.4 - Operating system: Ubuntu Server 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (https://try.gitea.io/mibuthu/wiki-test/wiki/Test2%20Test) - [ ] No - [ ] Not relevant ## Description There was a change in the way how the wiki sites with special character in the site name (e.g. spaces) are saved in the wiki git repository between 1.0 and 1.1. I know that 1.1 had some additional issues with that which were fixed in 1.1.1, but it is still not completely solved in 1.1.1 and also not in the actual master: An example wiki entry with the site name "Test Test" was saved as "Test Test.md" in 1.0 and is saved as "Test-Test.md" since 1.1. But already existing entries from 1.0 are kept with the old name format also after the update. This makes troubles when I want to edit an old entry, I get a 500 error when I want to save the changes with the following message in the logfile: `routers/repo/wiki.go:500 EditWikiPost()] [E] EditWikiPage: Failed to remove data/tmp/local-wiki/2/Test-Test.md: remove data/tmp/local-wiki/2/Test-Test.md: no such file or directory` Additionally the url is not encoded correctly. To reproduce this on try.gitea.io i created a new entry via the filesystem of the cloned wiki repository in the old style format with spaces, and this issue is reproducible with this. This is also another issue with the new format if someone creates a new wiki entry in this way. You can find these examples in https://try.gitea.io/mibuthu/wiki-test/wiki. In my opinion the old style format in the filesystem was better, but I can also go with the new one, but then at least some additional checks/changes are required and a migration for old and in-filesystem-created entries should be included. What are your thoughts about this?
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 03:35:50 -06:00
Author
Owner

@chesedo commented on GitHub (Jun 8, 2017):

I just had the same problem. Trying to just rename the files to have a hyphen instead of the space also ended up in two entries being created for each wiki item (with the update not being recognized). Had to clear the wiki in the end - in project settings - and start over again.

@chesedo commented on GitHub (Jun 8, 2017): I just had the same problem. Trying to just rename the files to have a hyphen instead of the space also ended up in two entries being created for each wiki item (with the update not being recognized). Had to clear the wiki in the end - in project settings - and start over again.
Author
Owner

@agaida commented on GitHub (Jun 12, 2017):

same here - it works sometimes for unknown reasons, if i touch the wiki next time i get a 500

@agaida commented on GitHub (Jun 12, 2017): same here - it works sometimes for unknown reasons, if i touch the wiki next time i get a 500
Author
Owner

@moritzheiber commented on GitHub (Aug 22, 2017):

Is there a way to mitigate this issue except completely removing the wiki and re-creating it? Will this happen again with the newly created wiki?

@moritzheiber commented on GitHub (Aug 22, 2017): Is there a way to mitigate this issue except completely removing the wiki and re-creating it? Will this happen again with the newly created wiki?
Author
Owner

@bwbroersma commented on GitHub (Dec 6, 2017):

To manually fix the error, replace all + in the url to -, from there you can edit the page.
Also note that the wiki is just a git repo, named repo.wiki.git instead of repo.git, so:
git clone git@hostname:user/repo.wiki.git

@bwbroersma commented on GitHub (Dec 6, 2017): To manually fix the error, replace all `+` in the url to `-`, from there you can edit the page. Also note that the wiki is just a git repo, named `repo.wiki.git` instead of `repo.git`, so: ```git clone git@hostname:user/repo.wiki.git```
Author
Owner

@stale[bot] commented on GitHub (Feb 10, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 10, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@zeripath commented on GitHub (Jun 2, 2019):

Is this still an issue

I think it affects only very early versions of Gitea.

@zeripath commented on GitHub (Jun 2, 2019): Is this still an issue I think it affects only very early versions of Gitea.
Author
Owner

@6543 commented on GitHub (Oct 24, 2019):

@zeripath what do you mean ?

close this or not?

@6543 commented on GitHub (Oct 24, 2019): @zeripath what do you mean ? close this or not?
Author
Owner

@lunny commented on GitHub (Nov 2, 2019):

Let's close this now and please feel free to reopen it.

@lunny commented on GitHub (Nov 2, 2019): Let's close this now and please feel free to reopen it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#769