haru / redmine_wiki_extensions

58 stars 30 forks source link

Attempts to add a tab in progect - settings - wiki extensions results in an HTTP ERROR 400 #14

Closed Autumnf0x closed 4 years ago

Autumnf0x commented 5 years ago

Attempts to add a tab in progect - settings - wiki extensions results in an HTTP ERROR 400

Environment: Redmine version 4.0.4.stable Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux] Rails version 5.2.3 Environment production Database adapter Mysql2

Redmine plugins: redmine_agile 1.4.12 redmine_include_macro_extension 0.0.3 redmine_percent_done 1.1.0 redmine_related_wiki 1.0.0 redmine_wiki_embedded 0.0.1 redmine_wiki_extensions 0.9.0 redmineup_tags 2.0.7

Autumnf0x commented 5 years ago

Maybe this is not a bug and there is a solution? Are there any similar precedents?

juno-nishizaki commented 4 years ago

This is error log.

App 115 output: I, [2020-06-11T23:59:43.897807 #115]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"Sg+QAaAlobMjlIcrF87TDuRXVFspb8gRTs1Hj+O16S0UOIXJPCGl6dy45my/pPtpqqcMSufuTvLJ4+SZd1zAEA==", "menus"=>{"0"=>{"enabled"=>"true", "menu_no"=>"1", "title"=>"sample", "page_name"=>"sample"}, "1"=>{"menu_no"=>"2"}, "2"=>{"menu_no"=>"3"}, "3"=>{"menu_no"=>"4"}, "4"=>{"menu_no"=>"5"}}, "commit"=>"更新", "partial"=>"wiki_extensions_settings/update", "setting_id"=>"1", "tab"=>"wiki_extensions", "id"=>"test"}
App 115 output: I, [2020-06-11T23:59:43.921656 #115]  INFO -- :   Current user: admin (id=1)
App 115 output: I, [2020-06-11T23:59:43.940224 #115]  INFO -- : Completed 500 Internal Server Error in 42ms (ActiveRecord: 19.7ms)
App 115 output: F, [2020-06-11T23:59:43.941299 #115] FATAL -- :
App 115 output: F, [2020-06-11T23:59:43.941365 #115] FATAL -- : ActionController::ParameterMissing (param is missing or the value is empty: setting):
App 115 output: F, [2020-06-11T23:59:43.941503 #115] FATAL -- :
App 115 output: F, [2020-06-11T23:59:43.941559 #115] FATAL -- : plugins/redmine_wiki_extensions/app/controllers/wiki_extensions_settings_controller.rb:36:in `block in update'
App 115 output: plugins/redmine_wiki_extensions/app/controllers/wiki_extensions_settings_controller.rb:29:in `update'
App 115 output: lib/redmine/sudo_mode.rb:65:in `sudo_mode'

So I commented out below lines and restarted redmine. This issue was solved.

https://github.com/haru/redmine_wiki_extensions/blob/develop/app/controllers/wiki_extensions_settings_controller.rb#L36-L37

I think that you might have to change it when you removed auto preview and tag disabled settings.

https://github.com/haru/redmine_wiki_extensions/commit/0c47d088fc71a1732209e68f86314fc0c855f8ad#diff-c45cf46e56d0fabd37afad22d8b8f9c5

haru commented 4 years ago

Thanks. I fixed this.