Skip to content

Broken links in "Search repository" result #15135

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

Closed
Beh01der opened this issue Mar 24, 2021 · 2 comments
Closed

Broken links in "Search repository" result #15135

Beh01der opened this issue Mar 24, 2021 · 2 comments
Labels

Comments

@Beh01der
Copy link

There's a regression here.

ctx.Data["SourcePath"] = path.Join(setting.AppSubURL, ctx.Repo.Repository.Owner.Name, ctx.Repo.Repository.Name)

This causes search result links to be relative to the repository page.
For example, I am getting
http://git.chronos/andrey/memz-service/andrey/memz-service/src/commit/cc5f663c1a4aa05b60c0060f99869c90bf9a493d/web/dev/tinymce/plugins/example/dialog.html
instead of
http://git.chronos/andrey/memz-service/src/commit/cc5f663c1a4aa05b60c0060f99869c90bf9a493d/web/dev/tinymce/plugins/example/dialog.html

Older version
ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(ctx.Repo.Repository.Owner.Name, ctx.Repo.Repository.Name)
works fine

@noerw noerw added type/bug good first issue Likely to be an easy fix labels Mar 24, 2021
@noerw
Copy link
Member

noerw commented Mar 24, 2021

This is a regression of #12999, very similar to #15021
There may be more such regressions, this should be properly checked

@noerw noerw removed the good first issue Likely to be an easy fix label Mar 24, 2021
@wxiaoguang
Copy link
Contributor

It should have been fixed.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants