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

"Ghost" user in issue list points 404 page, but should not be clickable #6270

Closed
1 of 3 tasks
tklein23 opened this issue Mar 7, 2019 · 5 comments · Fixed by #6410
Closed
1 of 3 tasks

"Ghost" user in issue list points 404 page, but should not be clickable #6270

tklein23 opened this issue Mar 7, 2019 · 5 comments · Fixed by #6410
Labels
topic/ui Change the appearance of the Gitea UI

Comments

@tklein23
Copy link
Contributor

tklein23 commented Mar 7, 2019

  • When a user creates an issue, then the name in the issue list is clickable and points to the profile (which is correct)
  • When the user is deleted, then the name changes to "Ghost", but is still clickable and sends to 404 page (which is not correct)

The incorrect line in the template is:

In other places ghost links are handled correctly:

  • {{if gt .Issue.Poster.ID 0}}
    {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}}
    {{else}}
    {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
    {{end}}

I was able to reproduce the bug in:

@tklein23
Copy link
Contributor Author

tklein23 commented Mar 7, 2019

The example on try.gitea.io (issue #2 in the list) where Ghost should not be clickable:

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Mar 7, 2019
@lunny
Copy link
Member

lunny commented Mar 9, 2019

@tklein23 could you send a PR to fix that?

@tklein23
Copy link
Contributor Author

tklein23 commented Mar 9, 2019

tl;dr: Sorry, I can't do that.

A CR would require additional translations for issues.closed_by and issues.merged_by in all supported languages. IMO this is the wrong approach, because this increases the cost for adding new and supporting the existing languages.

Someone with more knowledge about the template language should probably see if it's possible to fix the macro and avoid having a "_fake" variant of each issue event.

Maybe I can do that once I'm more familiar with the gitea codebase, but for sure I cannot do it right now.

@adelowo
Copy link
Member

adelowo commented Mar 10, 2019

You don't have to do all of the translations. Only the English one is needed, others will be added as needed on https://crowdin.com .

@oscarlofwenhamn
Copy link
Contributor

oscarlofwenhamn commented Mar 22, 2019

I think I've fixed the issue in the above commit, but I'm not sure how to properly make a PR as I have another one pending, and committing seems to add it to that PR, sorry.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants