Skip to content

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

Closed
@steko

Description

@steko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions