Skip to content

Dublicate AppSubUrl in context_menu template #26060

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
ghost opened this issue Jul 22, 2023 · 0 comments · Fixed by #26066
Closed

Dublicate AppSubUrl in context_menu template #26060

ghost opened this issue Jul 22, 2023 · 0 comments · Fixed by #26066
Labels

Comments

@ghost
Copy link

ghost commented Jul 22, 2023

Description

"Copy Link" in templates/repo/issue/view_content/context_menu.tmpl is constructed this way: data-clipboard-text="{{AppSubUrl}}{{$referenceUrl}}". It seems that {{AppSubUrl}} is redundant:

  • $referenceUrl -> .ctxData.Issue.Link -> func (issue *Issue) Link() string
  • func (issue *Issue) Link() string-> fmt.Sprintf("%s/%s/%d", issue.Repo.Link(), path, issue.Index)
  • issue.Repo.Link() -> setting.AppSubURL + "/" + url.PathEscape(repo.OwnerName) + "/" + url.PathEscape(repo.Name)

As you can see there is already AppSubURL in referenceUrl so it looks like that it should be removed from the template.

Gitea Version

1.20

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

SQLite

@ghost ghost added the type/bug label Jul 22, 2023
KN4CK3R pushed a commit that referenced this issue Jul 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2023
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants