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

Remove deliver method call to avoid 500 error on user create #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeremy5189
Copy link

Steps to reproduce

Create a new user on page /users/new with Send account information to the user checked.

Expected behavior

Successfully create a user and redirect to user list

Actual behavior

Internal error page was displayed, with error output in log/production.log:

Completed 500 Internal Server Error in 169ms (ActiveRecord: 140.6ms)

NoMethodError (undefined method `deliver' for #<ActionMailer::DeliveryJob:0x000055d2d7939770>):

plugins/redmine_wktime/lib/userscontroller_patch.rb:12:in `create'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

System configuration

  • Redmine version: 4.1.1.stable.20095
  • Ruby version: 2.5.5-p157 (2019-03-15) [x86_64-linux-gnu]
  • Rails version: 5.2.4.2
  • Environment: production
  • Database adapter: Mysql2
  • Mailer queue: ActiveJob::QueueAdapters::AsyncAdapter
  • Mailer delivery: smtp
  • redmine_wktime: 4.0.4

Fix

app/models/mailer.rb:352 in redmine 4.1.1 already called method deliver_later. It's therefore not required to call deliver method again in lib/userscontroller_patch.rb:12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant