akiko-pusu / redmine_banner

Maintenance Repository - https://github.com/agileware-jp/redmine_banner
GNU General Public License v2.0
98 stars 53 forks source link

Internal Server Error when used with some other plugin and redmine 4.0 (no superclass method `project_settings_tabs) #101

Closed y503unavailable closed 5 years ago

y503unavailable commented 5 years ago

Summary

Internal Server Error when used with some other plugin and redmine 4.0

Description

Install redmine_default_custom_query and banner on Redmine 4.0. In this environment, Internal Server Error occurs when adding Project or displaying Project setting screen.

The following error is recorded in production.log.

ActionView::Template::Error (super: no superclass method `project_settings_tabs'

The situation is similar to the following. https://github.com/akiko-pusu/redmine_issue_templates/issues/217

Environment

Redmine version 4.0.3.stable Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux] Rails version 5.2.3 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Subversion 1.7.14 Git 1.8.3.1 Filesystem
Redmine plugins: redmine_banner 0.2.0 redmine_default_custom_query 1.4.0

Workaround

If any of the following actions are taken, an error will not occur on the project setting screen.

1.Remove one of Plugins of redmine_default_custom_query and banner.

  1. Perform the same correction as template on banner. https://github.com/akiko-pusu/redmine_issue_templates/commit/ea7f6ea623d380a40bdc51768b76111797e1c648

This is log for Internal Error

ActionView::Template::Error (super: no superclass method `project_settings_tabs' for #<#<Class:0x0000555b99b9de90>:0x0000555b9a9a91d8>
Did you mean?  project_issues_path):
    1: <h2><%=l(:label_settings)%></h2>
    2:
    3: <%= render_tabs project_settings_tabs %>
    4:
    5: <% html_title(l(:label_settings)) -%>

plugins/redmine_banner/lib/banners/projects_helper_patch.rb:8:in `project_settings_tabs'
plugins/redmine_default_custom_query/app/patches/helpers/projects_helper_patch.rb:13:in `project_settings_tabs_with_default_query_setting_tab'
plugins/redmine_banner/lib/banners/projects_helper_patch.rb:8:in `project_settings_tabs'
app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb___172753448128794209_46925954742420'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
akiko-pusu commented 5 years ago

Thanks for your reporting issue. Though I didn't review why above conflict happened, I've just applied workaround and merged into master branch.

y503unavailable commented 5 years ago

Thanks for your quick fix. I confirmed that it was fixed by the latest master branch.