Defect #35470

Create "New Group" results in HTTP code 500

Added by Mark Tomm 3 months ago. Updated 2 months ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Groups
Target version:-
Resolution: Affected version:4.2.1

Description

Redmine logs output

App 174 output: I, [2021-06-27T08:09:33.046085 #174]  INFO -- : Started POST "/redmine/groups" for 172.30.23.1 at 2021-06-27 08:09:33 +0300
App 174 output: I, [2021-06-27T08:09:33.047230 #174]  INFO -- : Processing by GroupsController#create as HTML
App 174 output: I, [2021-06-27T08:09:33.047325 #174]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"XXXX", "group"=>{"name"=>"test"}, "commit"=>"Create"}
App 174 output: I, [2021-06-27T08:09:33.115818 #174]  INFO -- :   Current user: XXXX (id=XXXX)
App 174 output: I, [2021-06-27T08:09:33.123919 #174]  INFO -- : Completed 500 Internal Server Error in 76ms (ActiveRecord: 66.7ms)
App 174 output: F, [2021-06-27T08:09:33.125716 #174] FATAL -- :   
App 174 output: F, [2021-06-27T08:09:33.125742 #174] FATAL -- : ActiveRecord::NotNullViolation (Mysql2::Error: Field 'mail_notification' doesn't have a default value: INSERT INTO `users` (`login`, `hashed_password`, `firstname`, `lastname`, `created_on`, `updated_on`, `type`) VALUES ('', '', '', 'test', '2021-06-27 08:09:33', '2021-06-27 08:09:33', 'Group')):
App 174 output: F, [2021-06-27T08:09:33.125773 #174] FATAL -- :   
App 174 output: F, [2021-06-27T08:09:33.125792 #174] FATAL -- : app/controllers/groups_controller.rb:68:in `block in create'
App 174 output: app/controllers/groups_controller.rb:67:in `create'
App 174 output: lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Redmine info

Running official Docker image without modifications (https://hub.docker.com/_/redmine/).
We have 3 plugins, info listed below.

Environment:
  Redmine version                4.2.1.stable
  Ruby version                   2.7.3-p183 (2021-04-05) [x86_64-linux]
  Rails version                  5.2.5
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.10.4
  Mercurial                      4.8.2
  Bazaar                         2.8.0
  Git                            2.20.1
  Filesystem                     
Redmine plugins:
  redmine_checklists             3.1.18
  redmine_contacts               4.3.2
  redmineup_tags                 2.0.8

Our Redmine DB exists from 2011 (from 1.x to 4.x).

Setting.default_notification_option check:

root@redmine:/usr/src/redmine# rails c p
Loading production environment (Rails 5.2.5)
irb(main):001:0> Setting.default_notification_option
=> "only_my_events" 

Notes

The same issue occurred in Redmine 3.x prior to migration to 4.2.1

Related issues: #34255

History

#1 Updated by Go MAEDA 3 months ago

Can you please check if the error occurs without plugins?

#2 Updated by Holger Just 2 months ago

  • Status changed from New to Needs feedback

Please also make sure that you have applied all pending database migrations. See RedmineUpgrade for details.

Also available in: Atom PDF