haru / redmine_theme_changer

55 stars 28 forks source link

ApplicationHelper::ThemeChangerUserSetting is uninitialized #13

Open shaoran opened 4 years ago

shaoran commented 4 years ago

I've installed the version 0.4.0 (from the releases page).

I'm running with ruby-2.6.5 & redmine 4.0.5 and after executing bundle exec rake redmine:plugins:migrate RAILS_ENV=production I restarted the ruby proc. I get this error

Started GET "/admin/plugins" for 87.158.178.105 at 2019-10-28 23:25:12 +0100
Processing by AdminController#plugins as HTML
  Current user: yanez (id=5)
  Rendering admin/plugins.html.erb within layouts/admin
  Rendered admin/plugins.html.erb within layouts/admin (0.7ms)
  Rendered admin/_menu.html.erb (1.0ms)
  Rendering layouts/base.html.erb
  Rendered layouts/base.html.erb (10.7ms)
Completed 500 Internal Server Error in 26ms (ActiveRecord: 9.7ms)

ActionView::Template::Error (uninitialized constant ApplicationHelper::ThemeChangerUserSetting
Did you mean?  ThemeChangerUserPreferencePatch):
     9: <meta name="description" content="<%= Redmine::Info.app_name %>">
    10: <meta name="keywords" content="issue,bug,tracker">
    11: <%= csrf_meta_tag %>
    12: <%= favicon %>
    13: <%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'application', 'responsive', :media => 'all' %>
    14: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
    15: <%= javascript_heads %>

plugins/redmine_theme_changer-0.4.0/lib/theme_changer_themes_patch.rb:24:in `get_theme'
plugins/redmine_theme_changer-0.4.0/lib/theme_changer_themes_patch.rb:32:in `current_theme'
app/helpers/application_helper.rb:1518:in `favicon_path'
app/helpers/application_helper.rb:1513:in `favicon'
app/views/layouts/base.html.erb:12:in `_c41f7f3c86ec1c519d74b993f2c7a538'
app/views/layouts/admin.html.erb:8:in `_e4396385ad1b7c33cc784181ba6c72a9'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

How can I fix that?

meolic commented 4 years ago

Is this still a problem? Is this reproducible on Redmine 4.1?

shaoran commented 4 years ago

I don't know. Because I had this issues, I removed this plugin when I upgraded to redmine 4. I will have to test it with version 4.1, so I will need to make a copy of my production env and test it there. I'll do that in the weekend and let you know. Thanks.