Skip to content

Clicking on a feature branch name from a dashboard entry directs to the wrong url (404) #17943

Closed
@eeyrjmr

Description

@eeyrjmr

Gitea Version

1.16.0+dev-670-gc7e23401a

Git Version

2.34

Operating System

windows

How are you running Gitea?

windows service

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

reports on the dashboard indicate that some parts are clickable

eeyrjmr pushed to some_branch at eeyrjmr/test_issues

However the branch url points to https://try.gitea.io/some_branch instead of https://try.gitea.io/eeyrjmr/test_issues/src/branch/some_branch ie the base url does not consider the user/organisation + repository

Annotation 2021-12-10 000603
Annotation 2021-12-10 000627

Screenshots

No response

Activity

added this to the 1.16.0 milestone on Dec 10, 2021
jpraet

jpraet commented on Dec 12, 2021

@jpraet
Member

In #17551

commit_repo = pushed to <a href="%[1]s/src/branch/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
got replaced by
commit_repo = pushed to <a href="%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
in locale_en-US.ini, but this change was not reflected in feeds.tmpl.

Other types of links in the action feed are simarly broken.

I also wonder about the impact of such structural changes to the parameters passed to existing localized messages: these will need to be updated in all other supported languages, otherwise they will have broken links as well?

zeripath

zeripath commented on Dec 14, 2021

@zeripath
Contributor

We absolutely should not have translators responsible for building URLs. It's bad enough that there's HTML in there but building URLs is not a good idea.

That's why this was changed.

I also wonder about the impact of such structural changes to the parameters passed to existing localized messages: these will need to be updated in all other supported languages, otherwise they will have broken links as well?

Crowdin notices the change and translators update so this is not a problem.

zeripath

zeripath commented on Dec 14, 2021

@zeripath
Contributor

Ok so it looks like there were a few places missed in feeds.tmpl where the branch URL needs to be correctly formed. Would be a quick pr to fix

added
issue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP
on Dec 15, 2021
added a commit that references this issue on Dec 15, 2021
f7c4de4
added a commit that references this issue on Dec 16, 2021
8354670
added a commit that references this issue on Mar 28, 2022
c7c8e47
locked and limited conversation to collaborators on Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAPtype/bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Participants

      @lunny@zeripath@jpraet@eeyrjmr

      Issue actions

        Clicking on a feature branch name from a dashboard entry directs to the wrong url (404) · Issue #17943 · go-gitea/gitea