schmidt / redmine_zxcvbn

Redmine zxcvbn plugin
https://www.redmine.org/plugins/redmine_zxcvbn
GNU General Public License v3.0
5 stars 3 forks source link

Internal Server Error when trying to use this with v3.2.6 #2

Open Chewie9999 opened 4 years ago

Chewie9999 commented 4 years ago

I unzipped the file into the plugins directory, changed the permissions to the same as the other plugins, rang "Bundle" and then rebooted, just to make sure, but now I get the following:

Started GET "/" for 46.247.10.190 at 2020-02-08 22:51:34 +0000
Processing by WelcomeController#index as HTML
  Current user: anonymous
Redirected to http://projects.xxxxxx.net/login?back_url=http%3A%2F%2Fprojects.xxxxxx.net%2F
Filter chain halted as :check_if_login_required rendered or redirected
Completed 302 Found in 23ms (ActiveRecord: 1.6ms)
Started GET "/" for 46.247.10.190 at 2020-02-08 22:51:36 +0000
Processing by WelcomeController#index as HTML
  Current user: anonymous
Redirected to http://projects.xxxxxx.net/login?back_url=http%3A%2F%2Fprojects.xxxxxx.net%2F
Filter chain halted as :check_if_login_required rendered or redirected
Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
Started GET "/" for 195.235.104.212 at 2020-02-08 22:51:38 +0000
Processing by WelcomeController#index as HTML
  Current user: XXXXX (id=6)
  Rendered welcome/index.html.erb within layouts/base (46.5ms)
Missing template, responding with 404
  Rendered common/error.html.erb within layouts/base (0.1ms)
Completed 500 Internal Server Error in 141ms (ActiveRecord: 22.3ms)

ActionView::Template::Error (Missing partial hooks/redmine_zxcvbn/_view_layouts_base_body_bottom with {:locale=>[:en], :
formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :haml, :rsb]}. Searched in:
  * "/var/www/redmine/plugins/wiki_graphviz_plugin/app/views"
  * "/var/www/redmine/plugins/redmine_ics_export/app/views"
  * "/var/www/redmine/plugins/redmine_checklists/app/views"
  * "/var/www/redmine/app/views"
  * "/usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/redmine_crm-0.0.52/app/views"
):
    115:   <div class="bgl"><div class="bgr">
    116:     Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2017 Jean-Philippe Lang
    117:   </div></div>
    118: </div>
    119: </div>
    120: </div>
    121: <%= call_hook :view_layouts_base_body_bottom %>
  lib/redmine/hook/view_listener.rb:59:in `block (2 levels) in render_on'
  lib/redmine/hook/view_listener.rb:57:in `map'
  lib/redmine/hook/view_listener.rb:57:in `block in render_on'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  app/views/layouts/base.html.erb:118:in `_app_views_layouts_base_html_erb__4592899337639936857_47278591181120'
  app/controllers/application_controller.rb:470:in `block (2 levels) in render_error'
  app/controllers/application_controller.rb:468:in `render_error'
  app/controllers/application_controller.rb:456:in `render_404'
  app/controllers/application_controller.rb:480:in `missing_template'

Removing the plugin directory and rebooting, allows redmine to function normally again.

Infomation screen:

Environment:
  Redmine version                3.2.6.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Mercurial                      3.1.2
  Bazaar                         2.7.0
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_checklists             3.1.16
  redmine_ics_export             3.0.1.dev
  redmine_issues_tree            0.0.14
  redmine_plugin_views_revisions 0.0.1
  wiki_graphviz_plugin           0.7.0
schmidt commented 4 years ago

Unfortunately, I'm not able to test with Ruby 2.3 right now, 2.4 is the oldest Ruby version I have available. And Redmine only supports Ruby 2.4 since version Redmine 3.4.

With that setup however, everything seems to work as expected.

However, looking at the error you've provided, there seems to be something off with your installation anyway. The redmine_zxcvbn views folder is not in the template search path

  * "/var/www/redmine/plugins/wiki_graphviz_plugin/app/views"
  * "/var/www/redmine/plugins/redmine_ics_export/app/views"
  * "/var/www/redmine/plugins/redmine_checklists/app/views"
  * "/var/www/redmine/app/views"
  * "/usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/redmine_crm-0.0.52/app/views"

Please double check, that the plugin is installed in /var/www/redmine/plugins/redmine_zxcvbn and that it's readable for the web server user.

This may also be caused by redmine_plugin_views_revisions plugin, which seems to play around with the views on purpose. This may have undesired side effects in this case. I am not familiar with the plugin and maybe it works as expected. But this would be a lead that I suggest to investigate further.

Chewie9999 commented 4 years ago

Thank you for the reply. I will try again and post the results.