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

[Bug Report] Wiki as submodule #18590

Closed
schorsch13 opened this issue Feb 4, 2022 · 2 comments · Fixed by #18831
Closed

[Bug Report] Wiki as submodule #18590

schorsch13 opened this issue Feb 4, 2022 · 2 comments · Fixed by #18831
Labels
good first issue Likely to be an easy fix type/enhancement An improvement of existing functionality

Comments

@schorsch13
Copy link
Contributor

Introduction

When adding the wiki of a repo to the repo itself as a submodule, you will get a 404 error in the web UI when clicking on the submodule. This occurs due to the fact that the wiki is no real repo.

Example

Here are two example repositories. One on codeberg and one on try.gitea

Proposal

The wiki has the exact same name as the original repo but with the suffix .wiki. When accessing https://gitea-instace.example/user/repo.wiki just redirect to https://gitea-instance.example/user/repo/wiki

Credits

The bug was discovered by the codeberg user ncc1988. They also suggested the workaround. For further information have a look at the issue on codeberg: https://codeberg.org/Codeberg/Community/issues/217

@schorsch13 schorsch13 changed the title [Bug Report] [Bug Report] Wiki as submodule Feb 4, 2022
@lunny
Copy link
Member

lunny commented Feb 20, 2022

But this maybe a break for those repositories have suffix .wiki but in fact it's not a wiki of some repositories.

a1012112796 added a commit to a1012112796/gitea that referenced this issue Feb 22, 2022
fix go-gitea#18590

Signed-off-by: a1012112796 <1012112796@qq.com>
@a1012112796
Copy link
Member

But this maybe a break for those repositories have suffix .wiki but in fact it's not a wiki of some repositories.

@lunny .wiki has been reserved.

reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"}

@noerw noerw added type/enhancement An improvement of existing functionality good first issue Likely to be an easy fix labels Mar 12, 2022
zeripath added a commit that referenced this issue Mar 23, 2022
Redirect .wiki/* ui link to /wiki

fix #18590

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 23, 2022
Backport go-gitea#18831

Redirect .wiki/* ui link to /wiki

fix go-gitea#18590

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Mar 23, 2022
Backport #18831

Redirect .wiki/* ui link to /wiki

fix #18590

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
Redirect .wiki/* ui link to /wiki

fix go-gitea#18590

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Likely to be an easy fix type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants