Project

General

Profile

Internal error when updating e-mail notification settings

Added by Miguel Rentes over 5 years ago

Hi everyone,

I installed Redmine stable on a Debian 9 server from apt, and was configuring the e-mail notification settings. I copied configuration.yml.example and changed it to configuration.yml with the following contents:

# default configuration options for all environments
default:
  email_delivery:
      delivery_method: :smtp
      smtp_settings:
        enable_starttls_auto: true
        address: "smtp.office365.com" 
        port: 587
        authentication: :login
        domain: '<my domain>'
        user_name: '<my user>'
        password: '<my password>'

I tested sending e-mails from redmine and it works perfectly. The problem is when I change any setting from the E-mail Notification setting page. Any change on any field will result in the following error:

Started POST "/redmine/settings/edit?tab=notifications" for <ommited> at 2018-07-25 16:53:17 +0100
Processing by SettingsController#edit as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"<ommited>", "settings"=>{"mail_from"=>"<ommited>", "bcc_recipients"=>"1", "plain_text_mail"=>"0", "default_notification_option"=>"only_my_events", "notified_events"=>["", "issue_added", "issue_updated"], "emails_header"=>"", "emails_footer"=>"You have received this notification because you have either subscribed to it, or are involved in it.\r\nTo change your notification preferences, please click here: http://hostname/my/account"}, "commit"=>"Guardar", "tab"=>"notifications"}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 32ms (ActiveRecord: 14.7ms)

NoMethodError (undefined method `to_sym' for nil:NilClass
Did you mean?  to_s):
  app/models/setting.rb:117:in `[]='
  app/models/setting.rb:148:in `set_from_params'
  app/models/setting.rb:127:in `block in set_all_from_params'
  app/models/setting.rb:125:in `each'
  app/models/setting.rb:125:in `set_all_from_params'
  app/controllers/settings_controller.rb:36:in `edit'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I am using Redmine in Portuguese, hence the "Guardar" action (which means "Save" in English btw). I don't know what can I do to fix this, please help.
My current environment settings are as follows:

Environment:
  Redmine version                3.3.1.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux-gnu]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Git                            2.11.0
  Filesystem
Redmine plugins:
  no plugin installed

Thank you.


Replies (1)

RE: Internal error when updating e-mail notification settings - Added by Miguel Rentes over 5 years ago

I managed to solve this problem by backing up the database, dropping it, completely remove redmine and install it again. Then I inserted the data from the database backup for the tables I needed (projects, issues, etc.) and everything works great now.

    (1-1/1)