-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix issue with issue default mail template #16956
Conversation
The mail template rendering was failing with the 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` The issue was the template variable i18n is available in the outer scope.
Codecov Report
@@ Coverage Diff @@
## main #16956 +/- ##
==========================================
- Coverage 45.19% 45.17% -0.03%
==========================================
Files 762 762
Lines 86173 86174 +1
==========================================
- Hits 38942 38925 -17
- Misses 40935 40949 +14
- Partials 6296 6300 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Please send backport to v1.15 |
git pull --all -p
git checkout origin/release/v1.15 -b backport-16956
git cherry-pick 4c7a70b
git commit --amend # Add `Backport #16956` as the first line of the body of the comment - leave the title as is
git push $FORK_NAME backport-16956
xdg-open https://github.com/go-gitea/gitea/compare/release/v1.15...prasadkatti:backport-16956 |
Backport go-gitea#16956 The mail template rendering was failing with the 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` The issue was the template variable i18n is available in the outer scope. Fix go-gitea#16877
Backport #16956 The mail template rendering was failing with the 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` The issue was the template variable i18n is available in the outer scope. Fix #16877 Co-authored-by: 6543 <6543@obermui.de>
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19 * ENHANCEMENTS * Add fluid to ui container class to remove margin (go-gitea#16396) (go-gitea#16976) * Add caller to cat-file batch calls (go-gitea#17082) (go-gitea#17089) * BUGFIXES * Render full plain readme. (go-gitea#17083) (go-gitea#17090) * Upgrade xorm to v1.2.4 (go-gitea#17059) * Fix bug of migrate comments which only fetch one page (go-gitea#17055) (go-gitea#17058) * Do not show issue context popup on external issues (go-gitea#17050) (go-gitea#17054) * Decrement Fork Num when converting from Fork (go-gitea#17035) (go-gitea#17046) * Correctly rollback in ForkRepository (go-gitea#17034) (go-gitea#17045) * Fix missing close in WalkGitLog (go-gitea#17008) (go-gitea#17009) * Add prefix to SVG id/class attributes (go-gitea#16997) (go-gitea#17000) * Fix bug of migrated repository not index (go-gitea#16991) (go-gitea#16996) * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (go-gitea#16988) (go-gitea#16990) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (go-gitea#16971) (go-gitea#16977) * Fix issue with issue default mail template (go-gitea#16956) (go-gitea#16975) * Ensure that rebase conflicts are handled in updates (go-gitea#16952) (go-gitea#16960) * Prevent panic on diff generation (go-gitea#16950) (go-gitea#16951) Signed-off-by: Andrew Thornton <art27@cantab.net>
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19 * ENHANCEMENTS * Add fluid to ui container class to remove margin (#16396) (#16976) * Add caller to cat-file batch calls (#17082) (#17089) * BUGFIXES * Render full plain readme. (#17083) (#17090) * Upgrade xorm to v1.2.4 (#17059) * Fix bug of migrate comments which only fetch one page (#17055) (#17058) * Do not show issue context popup on external issues (#17050) (#17054) * Decrement Fork Num when converting from Fork (#17035) (#17046) * Correctly rollback in ForkRepository (#17034) (#17045) * Fix missing close in WalkGitLog (#17008) (#17009) * Add prefix to SVG id/class attributes (#16997) (#17000) * Fix bug of migrated repository not index (#16991) (#16996) * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (#16988) (#16990) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (#16971) (#16977) * Fix issue with issue default mail template (#16956) (#16975) * Ensure that rebase conflicts are handled in updates (#16952) (#16960) * Prevent panic on diff generation (#16950) (#16951) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19 * ENHANCEMENTS * Add fluid to ui container class to remove margin (go-gitea#16396) (go-gitea#16976) * Add caller to cat-file batch calls (go-gitea#17082) (go-gitea#17089) * BUGFIXES * Render full plain readme. (go-gitea#17083) (go-gitea#17090) * Upgrade xorm to v1.2.4 (go-gitea#17059) * Fix bug of migrate comments which only fetch one page (go-gitea#17055) (go-gitea#17058) * Do not show issue context popup on external issues (go-gitea#17050) (go-gitea#17054) * Decrement Fork Num when converting from Fork (go-gitea#17035) (go-gitea#17046) * Correctly rollback in ForkRepository (go-gitea#17034) (go-gitea#17045) * Fix missing close in WalkGitLog (go-gitea#17008) (go-gitea#17009) * Add prefix to SVG id/class attributes (go-gitea#16997) (go-gitea#17000) * Fix bug of migrated repository not index (go-gitea#16991) (go-gitea#16996) * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (go-gitea#16988) (go-gitea#16990) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (go-gitea#16971) (go-gitea#16977) * Fix issue with issue default mail template (go-gitea#16956) (go-gitea#16975) * Ensure that rebase conflicts are handled in updates (go-gitea#16952) (go-gitea#16960) * Prevent panic on diff generation (go-gitea#16950) (go-gitea#16951) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19 * ENHANCEMENTS * Add fluid to ui container class to remove margin (#16396) (#16976) * Add caller to cat-file batch calls (#17082) (#17089) * BUGFIXES * Render full plain readme. (#17083) (#17090) * Upgrade xorm to v1.2.4 (#17059) * Fix bug of migrate comments which only fetch one page (#17055) (#17058) * Do not show issue context popup on external issues (#17050) (#17054) * Decrement Fork Num when converting from Fork (#17035) (#17046) * Correctly rollback in ForkRepository (#17034) (#17045) * Fix missing close in WalkGitLog (#17008) (#17009) * Add prefix to SVG id/class attributes (#16997) (#17000) * Fix bug of migrated repository not index (#16991) (#16996) * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (#16988) (#16990) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (#16971) (#16977) * Fix issue with issue default mail template (#16956) (#16975) * Ensure that rebase conflicts are handled in updates (#16952) (#16960) * Prevent panic on diff generation (#16950) (#16951) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
The mail template rendering was failing with the 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
The issue was the template variable i18n is available in the outer scope.
Fixes #16877