Project

General

Profile

Help with NoMethodError in SettingPatch (Redmine Default Members plugin )

Added by Grey Grey over 5 years ago

Hello all.

I need help to fix next issue, after upgrade to Redmine 3.4.2 I get an exception each time when I try to save plugin configuration:

Processing by SettingsController#plugin as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"token", "settings"=>{"template"=>{"group"=>"group1", "roles"=>[""]}, "1"=>{"group"=>"group2", "roles"=>["", "24"]}, "2"=>{"group"=>"group3", "roles"=>["", "20"]}, "3"=>{"group"=>"group4", "roles"=>["", "6"]}, "4"=>{"group"=>"group5", "roles"=>["", "21"]}, "5"=>{"group"=>"group6", "roles"=>["", "19"]}, "6"=>{"group"=>"group7", "roles"=>["", "19"]}, "7"=>{"group"=>"group8", "roles"=>["", "19"]}, "8"=>{"group"=>"group9", "roles"=>["", "19"]}}, "commit"=>"Apply", "id"=>"redmine_default_members"}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 24ms (ActiveRecord: 4.1ms)

NoMethodError (private method `select' called for nil:NilClass):
  plugins/redmine_default_members/lib/redmine_default_members/patches/setting_patch.rb:25:in `block in save_default_members_values'
  plugins/redmine_default_members/lib/redmine_default_members/patches/setting_patch.rb:24:in `each'
  plugins/redmine_default_members/lib/redmine_default_members/patches/setting_patch.rb:24:in `save_default_members_values'
  app/models/setting.rb:117:in `[]='
  app/models/setting.rb:279:in `plugin_redmine_default_members='
  app/controllers/settings_controller.rb:71:in `plugin'