-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix wiki redirects #3919
Fix wiki redirects #3919
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3919 +/- ##
=======================================
Coverage 19.96% 19.96%
=======================================
Files 153 153
Lines 30478 30478
=======================================
Hits 6086 6086
Misses 23479 23479
Partials 913 913
Continue to review full report at Codecov.
|
routers/repo/wiki.go
Outdated
@@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) { | |||
return | |||
} | |||
|
|||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName)) | |||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + wikiName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think WikiNameToSubURL
should be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I missed this function completely. :-) I have pushed an updated version of the PR.
When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name.
When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name.
This happens on our instance since upgrading to Gitea 1.4. If the PR is okay, I will also prepare a backport for 1.4.