arkhitech / redmine_mentions

Allows users to mention team members in their notes/comments.
MIT License
94 stars 88 forks source link

Mailing in redmine 4.0.0 does not work #67

Closed LaurensRietveld closed 4 years ago

LaurensRietveld commented 5 years ago

I'm getting the following error in redmine 4.0.0 when somebody is mentioned (and the send-email is triggered):

ActionView::Template::Error (undefined method `default_url_options' for ActionMailer::Parameterized::Mailer:Class):
    1: <h4><%= link_to "[#{@issue.project.name} - #{@issue.tracker.name} ##{@issue.id}] #{@issue.subject}", issue_url(@issue) %></h4>
    2: 
    3: <br /><br />
    4: 

plugins/redmine_mentions/app/models/mention_mailer.rb:9:in `default_url_options'
plugins/redmine_mentions/app/views/mention_mailer/notify_mentioning.html.erb:1:in `_plugins_redmine_mentions_app_views_mention_mailer_notify_mentioning_html_erb___430758911849552215_74117420'
plugins/redmine_mentions/app/models/mention_mailer.rb:16:in `notify_mentioning'
plugins/redmine_mentions/lib/redmine_mentions/journal_patch.rb:19:in `block in send_mail'
plugins/redmine_mentions/lib/redmine_mentions/journal_patch.rb:16:in `each'
plugins/redmine_mentions/lib/redmine_mentions/journal_patch.rb:16:in `send_mail'
app/models/journal.rb:81:in `save'
app/models/issue.rb:1840:in `create_journal'
app/models/issue.rb:209:in `create_or_update'
app/controllers/issues_controller.rb:564:in `block in save_issue_with_child_records'
app/controllers/issues_controller.rb:552:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:169:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

ps. thanks for this plugin, very useful :+1:

christianlupus commented 4 years ago

I can confirm this problem on my installation as well.

hishammalik commented 4 years ago

the plugin has not yet been upgraded for redmine 4 compatibility. Please feel free to share pull request.

christianlupus commented 4 years ago

There is already PR #70. This solved it for me.

hishammalik commented 4 years ago

PR #70 merged