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

Link to user profile in issue list is missing server URL #16713

Closed
1 of 2 tasks
steko opened this issue Aug 17, 2021 · 7 comments
Closed
1 of 2 tasks

Link to user profile in issue list is missing server URL #16713

steko opened this issue Aug 17, 2021 · 7 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@steko
Copy link

steko commented Aug 17, 2021

Description

In the issue list, the name of the user who created the issue has a link to the user profile (under the issue title: issue#123 opened 12 hours ago by user). However, the href points to https:// instead of https://<instance.tld>/. This happens both on the user dashboard and the repository issue list. Both are caused by these lines in the issuelist.tmpl file:

{{if .OriginalAuthor }}
{{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}}
{{else if gt .Poster.ID 0}}
{{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName | Escape) | Safe}}
{{else}}
{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}}
{{end}}

In the issue page, the same behavior is seen next to the open/closed label.

This seems caused by these lines in view_title.tmpl:

{{if .Issue.OriginalAuthor }}
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor | Safe}}
{{else if gt .Issue.Poster.ID 0}}
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink (.Issue.Poster.GetDisplayName|Escape) | Safe}}
{{else}}
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}}
{{end}}

Screenshots

See in the bottom left the URL preview pointing to https://steko instead of https://try.gitea.io/steko
Schermata da 2021-08-17 16-16-37

This is the issue page:
immagine

@noerw
Copy link
Member

noerw commented Aug 23, 2021

I can't reproduce this, also on the try link you provided, probably already fixed?

@noerw noerw added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Aug 23, 2021
@steko
Copy link
Author

steko commented Aug 23, 2021

I just checked again on try.gitea.it and I still see the same issue as described, so I wouldn't say it's been fixed.

@noerw
Copy link
Member

noerw commented Aug 23, 2021

the link that gets rendered does not contain a domain section, and as such works correctly for me
image
maybe a browser extension meddles with your links? 🤔

@steko
Copy link
Author

steko commented Aug 23, 2021

Oh no I found the culprit. It's specific to Italian language, the href value is //steko because there's an extra "/" in the translation string. Can I submit a PR directly or do I need to go through Crowdin?

issues.opened_by=aperto %[1]s da <a href="/%[2]s">%[3]s</a>

@steko
Copy link
Author

steko commented Aug 23, 2021

I submitted a proposal for correcting the translation on Crowdin.

@noerw
Copy link
Member

noerw commented Aug 23, 2021

Great, I'll close this then

@noerw noerw closed this as completed Aug 23, 2021
@zeripath
Copy link
Contributor

agh we better backport a fix to 1.15

zeripath added a commit to zeripath/gitea that referenced this issue Aug 23, 2021
techknowlogick added a commit that referenced this issue Aug 23, 2021
Fix #16713

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

3 participants