y503unavailable / redmine-centos-ansible

RedmineをCentOSに自動インストールするためのAnsibleプレイブック mariadb利用、 Redmine UnofficialCooking版
https://redmine.tokyo/projects/unofficialcooking
MIT License
3 stars 1 forks source link

REST-API failed(redmine-tags,projects.json) #60

Open y503unavailable opened 2 years ago

y503unavailable commented 2 years ago

REST-APIが失敗する場合がある(projects.json)

Started GET "/redmine/projects.json?key=APIKEY

Processing by ProjectsController#index as JSON Parameters: {"offset"=>"0", "limit"=>"100", "key"=>"****"} Current user: admin (id=1) STATEMENT (projects.status IN ('1')) Rendering projects/index.api.rsb Rendered projects/index.api.rsb (106.5ms) Completed 500 Internal Server Error in 117ms (ActiveRecord: 2.7ms)

ActionView::Template::Error (undefined method `render_api_redmine_tags' for #<#:0x00007f57d1e9cc28> Did you mean? render_api_includes): 13: render_api_custom_values project.visible_custom_field_values, api 14: render_api_includes(project, api) 15: 16: api.created_on project.created_on 17: api.updated_on project.updated_on 18: end 19: end

app/views/projects/index.api.rsb:16:in block (4 levels) in _app_views_projects_index_api_rsb___469728308491098654_12918860' lib/redmine/views/builders/structure.rb:73:inmethod_missing' app/views/projects/index.api.rsb:3:in block (3 levels) in _app_views_projects_index_api_rsb___469728308491098654_12918860' app/views/projects/index.api.rsb:2:ineach' app/views/projects/index.api.rsb:2:in block (2 levels) in _app_views_projects_index_api_rsb___469728308491098654_12918860' lib/redmine/views/builders/structure.rb:34:inarray' app/views/projects/index.api.rsb:1:in block in _app_views_projects_index_api_rsb___469728308491098654_12918860' lib/redmine/views/builders.rb:36:infor' app/views/projects/index.api.rsb:1:in _app_views_projects_index_api_rsb___469728308491098654_12918860' plugins/redmine_per_project_formatting/lib/redmine_per_project_formatting/application_controller_patch.rb:24:inblock in change_text_formatting' plugins/redmine_per_project_formatting/lib/redmine_per_project_formatting/setting_patch.rb:19:in within_text_formatting' plugins/redmine_per_project_formatting/lib/redmine_per_project_formatting/application_controller_patch.rb:23:inchange_text_formatting' lib/redmine/sudo_mode.rb:61:in `sudo_mode'

y503unavailable commented 2 years ago

エラー時のログ上で関連する redmine_per_project_formattingとredmine_tagsプラグインを一時的に除外して切り分けた。 結果的に、redmine_tagsプラグインを除外する(pluginsから移動して再起動)と、RESTAPIが正常に動作することを確認した。 githubに同一状況のissueがあり、 https://github.com/ixti/redmine_tags/issues/222

下記の lib/redmine_tags/patches/add_helpers_for_issue_tags_patch.rb を1行修正することで動作した。 https://github.com/yzzy/redmine_tags/commit/4c3a04da826c8a56e1386f841571b8a429b32c90