hicknhack-software / redmine_hourglass

New Redmine plugin to enhance the time tracking abilities, reports and REST-API.
Other
78 stars 31 forks source link

no superclass method `project_settings_tabs' #138

Open thomst opened 4 years ago

thomst commented 4 years ago

After upgrading our redmine-instance to 4.0 we encountered the following error when open the project's configuration-tab:

App 1727 output: Started GET "/projects/administration/settings" for 93.131.0.35 at 2020-05-14 10:17:32 +0200
App 1727 output: Processing by ProjectsController#settings as HTML
App 1727 output:   Parameters: {"id"=>"administration"}
App 1727 output:   Current user: admin (id=1)
App 1727 output:   Rendering projects/settings.html.erb within layouts/base
App 1727 output:   Rendered projects/settings.html.erb within layouts/base (111.0ms)
App 1727 output: Completed 500 Internal Server Error in 129ms (ActiveRecord: 3.7ms)
App 1727 output:   
App 1727 output: ActionView::Template::Error (super: no superclass method `project_settings_tabs' for #<#<Class:0x000055862ab6ceb0>:0x000055862b5ce9a8>
App 1727 output: Did you mean?  project_settings_tabs_with_contacts):
App 1727 output:     1: <h2><%=l(:label_settings)%></h2>
App 1727 output:     2: 
App 1727 output:     3: <%= render_tabs project_settings_tabs %>
App 1727 output:     4: 
App 1727 output:     5: <% html_title(l(:label_settings)) -%>
App 1727 output:   
App 1727 output: plugins/redmine_hourglass/lib/hourglass/redmine_patches/projects_helper_patch.rb:17:in `project_settings_tabs'
App 1727 output: plugins/redmine_contacts_invoices/lib/redmine_invoices/patches/projects_helper_patch.rb:38:in `project_settings_tabs_with_invoices'
App 1727 output: plugins/redmine_hourglass/lib/hourglass/redmine_patches/projects_helper_patch.rb:17:in `project_settings_tabs'
App 1727 output: app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb__2555274482272157572_47017365303700'
App 1727 output: lib/redmine/sudo_mode.rb:63:in `sudo_mode'

After some investigation I found a similar issue in redmine_dmsf which seemed to be an incompatibility with other plugins.

Setup

Environment:
  Redmine version                4.0.7.stable
  Ruby version                   2.4.6-p354 (2019-04-01) [x86_64-linux]
  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:
  ...
  redmine_contacts               4.3.0
  redmine_contacts_invoices      4.2.3
  redmine_hourglass              1.1.1
  ...
thomst commented 4 years ago

Based on the code of redmine_contacts I rewrote projects_helper_patch.rb and it seems to work. I attach the rewritten file and a patch here. (I am not a ruby-programmer. I just done some copy-paste.) projects_helper_patch.zip

thomst commented 4 years ago

We are on hourglass-1.1.1. But projects_helper_patch.rb hasn't changed since then. So the issue and patch might be of interesst.

arBmind commented 4 years ago

Hi @thomst, thank you for reporting the issue and your investigations and patch. This will require a deeper inspection. I remember, that there was an evolution on Redmine Plugins on how these kinds of settings are added. When we wrote this, it was unclear what the final best approach will become.

thomst commented 2 years ago

We updated redmine to 4.1.7 and the hourglass plugin to 1.2.0-rc1. We have still the same issue. Is there a special reason why this issue is tagged as 'wontfix'?

arBmind commented 1 year ago

It is marked as wontfix because it seems we cannot fix it, without breaking other plugin compatibility. Redmine Plugins have all the possibilities, but developed independently, so some combinations will not work. We do not have the resources necessary, to fix compatibility issues with all existing and future Redmine plugins for free, for ever. Pull requests are always considered, but we won't provide a fix.