Actions
Bug #2618
closedxmera Omnia - Collection #2546: Third-Party module maintenance and bug-fixing
ActiveRecord::NotNullViolation with DMS project preferences
Start date:
11/21/2024
Due date:
11/25/2024
% Done:
100%
Estimated time:
Affected Version:
Compatible Redmine Version:
5.1.z, 6.0.z
Pull Request Link:
Description
Project settings » DMS
Project Preferences -> DMS Attachments: Files & DMS (default), wen selecting Files the error below is thrown.
Logfile
Started POST "/projects/meldungen/dmsf/state" for 192.168.3.25 at 2024-11-06 16:33:35 +0100
Processing by DmsfStateController#user_pref_save as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"+FxLLCTfQY08sH4P+oh28+r6OBGQlWO/EKSFWt3aWs33Q7KW+sIZ80rr/Z6RGsVD/+X38d4vhj/RIax5yKkxPw==", "title_format"=>"", "act_as_attachable"=>"2", "default_dmsf_query"=>"", "commit"=>"Speichern", "id"=>"meldungen"}
(1.3ms) SELECT MAX(`tokens`.`updated_on`) FROM `tokens` WHERE `tokens`.`user_id` = 1 AND `tokens`.`value` = 'a871ad76c108e6fe41bb52ba11e9bd9c0c55ac68' AND `tokens`.`action` = 'session'
↳ app/models/user.rb:478:in `verify_session_token'
Token Update All (14.3ms) UPDATE `tokens` SET `tokens`.`updated_on` = '2024-11-06 16:33:35' WHERE `tokens`.`user_id` = 1 AND `tokens`.`value` = 'a871ad76c108e6fe41bb52ba11e9bd9c0c55ac68' AND `tokens`.`action` = 'session'
↳ app/models/user.rb:482:in `verify_session_token'
(1.0ms) SELECT MAX(`settings`.`updated_on`) FROM `settings`
↳ app/models/setting.rb:280:in `check_cache'
User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`status` = 1 AND `users`.`id` = 1 LIMIT 1
↳ app/controllers/application_controller.rb:118:in `find_current_user'
Current user: admin (id=1)
CustomMessageSetting Load (0.5ms) SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'plugin_redmine_message_customize' ORDER BY `settings`.`id` DESC LIMIT 1
↳ app/models/setting.rb:363:in `find_or_default'
Project Load (0.3ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'meldungen' LIMIT 1
↳ app/models/project.rb:347:in `find'
(0.2ms) SELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 8
↳ app/models/project.rb:1302:in `allowed_permissions'
Member Load (0.4ms) SELECT `members`.* FROM `members` INNER JOIN `users` ON `users`.`id` = `members`.`user_id` WHERE `members`.`project_id` = 8 AND `users`.`type` = 'User' AND `users`.`status` = 1 AND `members`.`user_id` = 1 LIMIT 1
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:29:in `user_pref_save'
TRANSACTION (0.1ms) BEGIN
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
Principal Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
Project Load (0.2ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 8 LIMIT 1
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
Member Exists? (0.3ms) SELECT 1 AS one FROM `members` WHERE `members`.`user_id` = 1 AND `members`.`id` != 2 AND `members`.`project_id` = 8 LIMIT 1
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
MemberRole Exists? (0.3ms) SELECT 1 AS one FROM `member_roles` WHERE `member_roles`.`member_id` = 2 LIMIT 1
↳ app/models/member.rb:224:in `validate_role'
Member Update (0.4ms) UPDATE `members` SET `members`.`dmsf_mail_notification` = NULL WHERE `members`.`id` = 2
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
TRANSACTION (0.1ms) ROLLBACK
↳ plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
Completed 500 Internal Server Error in 48ms (ActiveRecord: 20.1ms | Allocations: 11000)
ActiveRecord::NotNullViolation (Mysql2::Error: Column 'dmsf_mail_notification' cannot be null):
plugins/redmine_dmsf/app/controllers/dmsf_state_controller.rb:34:in `user_pref_save'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:57:in `call'
Screenshot
Files
Actions