Actions
Defect #34255
openAdding new group results in Error 500
Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
When I try to add a new group (groups/new) I get an Error 500 with the following log message
Completed 500 Internal Server Error in 15ms (ActiveRecord: 9.7ms)
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 ('', '', '', 'Group name', '2020-11-12 18:55:38', '2020-11-12 18:55:38', 'Group')):
Details regarding Redmine
Environment:
Redmine version 4.1.1.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux-gnu]
Rails version 5.2.4.2
Environment production
Database adapter Mysql2
Any suggestions on how to get this fixed?
Updated by Pavel Rosický about 4 years ago
Setting.default_notification_option is probably blank for some reason? that should never happen
take a look if the default value is present in your database and config/settings.yml
any 3rd party plugins?
Updated by Sven Culley about 4 years ago
Code in settings.yml
default_notification_option:
default: 'only_my_events'
Full redmine info
Environment:
Redmine version 4.1.1.stable
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
SCM:
Git 2.20.1
Filesystem
Redmine plugins:
additionals 3.0.1-master
redmine_banner 0.3.4
redmine_slack 0.2
redmine_spent_time 4.1.0
view_customize 2.7.0
Updated by Pavel Rosický about 4 years ago
what is the result of
rails c p Setting.default_notification_option =>
?
try it without plugins
Updated by Sven Culley about 4 years ago
Loading production environment (Rails 5.2.4.2)
Setting.default_notification_option
=> "only_my_events"
Should be ok
Actions