Missing links in PR after comments #7780

Closed
opened 2025-11-02 07:36:18 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @melmus on GitHub (Aug 30, 2021).

  • Gitea version (or commit ref): v1.15.0
  • Git version: 2.30.2
  • Operating system: Ubuntu 18.04.4 LTS
    Gitea running in docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

After i create PR and our team comments or review PR, message "user commented on this pull request" comes to email, but i do not see link to PR in message. On the screenshots you can see an example of this problem.

Screenshots

recieve_message_from_pr

receive_email2

Originally created by @melmus on GitHub (Aug 30, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): v1.15.0 - Git version: 2.30.2 - Operating system: Ubuntu 18.04.4 LTS Gitea running in docker <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> After i create PR and our team comments or review PR, message "user commented on this pull request" comes to email, but i do not see link to PR in message. On the screenshots you can see an example of this problem. ## Screenshots ![recieve_message_from_pr](https://user-images.githubusercontent.com/15018126/131347043-4ce201d4-df02-4c34-ae4c-3cc05948f689.png) ![receive_email2](https://user-images.githubusercontent.com/15018126/131349251-0d455251-fa03-47db-a74c-31a792cc4c01.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/regressiongood first issuetype/bug labels 2025-11-02 07:36:18 -06:00
Author
Owner

@prasadkatti commented on GitHub (Sep 4, 2021):

Hi. I would like to work on fixing this issue. I have already done some triaging. The issue occurs because the template rendering fails with this error -

...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment

@prasadkatti commented on GitHub (Sep 4, 2021): Hi. I would like to work on fixing this issue. I have already done some triaging. The issue occurs because the template rendering fails with this error - > ...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment
Author
Owner

@zeripath commented on GitHub (Sep 4, 2021):

change line 65 in templates/mail/issue/default.tmpl from:

5a73153493/templates/mail/issue/default.tmpl (L65)

to:

			{{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}}

This bug is therefore a regression of #16200

and is backportable to 1.15

@zeripath commented on GitHub (Sep 4, 2021): change line 65 in templates/mail/issue/default.tmpl from: https://github.com/go-gitea/gitea/blob/5a73153493332a110fb9c3ac3f716972f6a2390c/templates/mail/issue/default.tmpl#L65 to: ```handlebars {{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}} ``` This bug is therefore a regression of #16200 and is backportable to 1.15
Author
Owner

@prasadkatti commented on GitHub (Sep 5, 2021):

@zeripath - Yes, thanks. I figured out that the i18n variable is defined in the outer scope and needs to be referenced using $.

@prasadkatti commented on GitHub (Sep 5, 2021): @zeripath - Yes, thanks. I figured out that the `i18n` variable is defined in the outer scope and needs to be referenced using `$`.
Author
Owner

@6543 commented on GitHub (Sep 5, 2021):

sorry missed that - thanks for the fix

@6543 commented on GitHub (Sep 5, 2021): sorry missed that - thanks for the fix
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7780