luismaia/redmine_email_fetcher

Internal error 500

byZARE opened this issue · 7 comments

dear developers

i installed the plugin and if i want to use it i get 500 internal error.
this comes up when i click on fetch emails and then i click on add configurations, the programm crashes

Here ist the log:
Started GET "/redmine/admin/email_configurations/new" for 127.0.0.1 at 2016-08-16 09:34:52 +0200
Processing by EmailConfigurationsController#new as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb (8.0ms)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb within layouts/base (15.0ms)
Completed 500 Internal Server Error in 191ms (ActiveRecord: 25.0ms)

ActionView::Template::Error (undefined method humanize' for nil:NilClass): 12: <p><%= f.select :flg_active, [['True', 'true'], ['False', 'false']], 13: { label: l(:field_flg_active), required: true } %> </p> 14: 15: <p> 16: <%= f.label '', { label: l(:field_last_fetch_at) } %> 17: <%- if @email_configuration.last_fetch_at.nil? %> 18: <%= '---' %> config/initializers/10-patches.rb:18:inhuman_attribute_name'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:15:in block in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___998869291_57151656' app/helpers/application_helper.rb:1051:inlabelled_form_for'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___998869291_57151656' plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb:3:in_plugins_redmine_email_fetcher_app_views_email_configurations_new_html_erb__939175692_48632388'
plugins/redmine_email_fetcher/app/controllers/email_configurations_controller.rb:32:in new' lib/redmine/sudo_mode.rb:63:insudo_mode'

Started GET "/redmine/admin/email_configurations/new" for 127.0.0.1 at 2016-08-16 09:35:00 +0200
Processing by EmailConfigurationsController#new as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb (14.0ms)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb within layouts/base (20.0ms)
Completed 500 Internal Server Error in 87ms (ActiveRecord: 28.0ms)

ActionView::Template::Error (undefined method humanize' for nil:NilClass): 12: <p><%= f.select :flg_active, [['True', 'true'], ['False', 'false']], 13: { label: l(:field_flg_active), required: true } %> </p> 14: 15: <p> 16: <%= f.label '', { label: l(:field_last_fetch_at) } %> 17: <%- if @email_configuration.last_fetch_at.nil? %> 18: <%= '---' %> config/initializers/10-patches.rb:18:inhuman_attribute_name'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:15:in block in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb__591721709_54631896' app/helpers/application_helper.rb:1051:inlabelled_form_for'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb__591721709_54631896' plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb:3:in_plugins_redmine_email_fetcher_app_views_email_configurations_new_html_erb__910021370_54736716'
plugins/redmine_email_fetcher/app/controllers/email_configurations_controller.rb:32:in new' lib/redmine/sudo_mode.rb:63:insudo_mode'

Started GET "/redmine/admin" for 127.0.0.1 at 2016-08-16 09:40:36 +0200
Processing by AdminController#index as HTML
Current user: admin (id=1)
Rendered admin/_menu.html.erb (0.0ms)
Rendered admin/index.html.erb within layouts/admin (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_header.erb (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_base.erb (0.0ms)
Rendered layouts/base.html.erb (15.6ms)
Completed 200 OK in 78ms (Views: 31.2ms | ActiveRecord: 46.8ms)
Started GET "/redmine/admin/email_configurations" for 127.0.0.1 at 2016-08-16 09:40:55 +0200
Processing by EmailConfigurationsController#index as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/index.html.erb within layouts/base (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_header.erb (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_base.erb (0.0ms)
Completed 200 OK in 62ms (Views: 15.6ms | ActiveRecord: 46.8ms)
Started GET "/redmine/users/1" for 127.0.0.1 at 2016-08-16 09:42:37 +0200
Processing by UsersController#show as HTML
Parameters: {"id"=>"1"}
Current user: admin (id=1)
Rendered users/show.html.erb within layouts/base (127.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_header.erb (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_base.erb (0.0ms)
Completed 200 OK in 397ms (Views: 65.0ms | ActiveRecord: 244.0ms)
Started GET "/redmine/admin" for 127.0.0.1 at 2016-08-16 09:42:40 +0200
Processing by AdminController#index as HTML
Current user: admin (id=1)
Rendered admin/_menu.html.erb (6.0ms)
Rendered admin/index.html.erb within layouts/admin (7.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_header.erb (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_base.erb (0.0ms)
Rendered layouts/base.html.erb (9.0ms)
Completed 200 OK in 67ms (Views: 16.0ms | ActiveRecord: 45.0ms)
Started GET "/redmine/admin/email_configurations" for 127.0.0.1 at 2016-08-16 09:42:41 +0200
Processing by EmailConfigurationsController#index as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/index.html.erb within layouts/base (1.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_header.erb (0.0ms)
Rendered plugins/redmine_jchat/app/views/hooks/redmine_jchat/_base.erb (0.0ms)
Completed 200 OK in 34ms (Views: 12.0ms | ActiveRecord: 18.0ms)
Started GET "/redmine/admin/email_configurations/new" for 127.0.0.1 at 2016-08-16 09:42:45 +0200
Processing by EmailConfigurationsController#new as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb (7.0ms)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb within layouts/base (7.0ms)
Completed 500 Internal Server Error in 42ms (ActiveRecord: 29.0ms)

ActionView::Template::Error (undefined method humanize' for nil:NilClass): 12: <p><%= f.select :flg_active, [['True', 'true'], ['False', 'false']], 13: { label: l(:field_flg_active), required: true } %> </p> 14: 15: <p> 16: <%= f.label '', { label: l(:field_last_fetch_at) } %> 17: <%- if @email_configuration.last_fetch_at.nil? %> 18: <%= '---' %> config/initializers/10-patches.rb:18:inhuman_attribute_name'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:15:in block in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___998869291_57151656' app/helpers/application_helper.rb:1051:inlabelled_form_for'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___998869291_57151656' plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb:3:in_plugins_redmine_email_fetcher_app_views_email_configurations_new_html_erb__939175692_48632388'
plugins/redmine_email_fetcher/app/controllers/email_configurations_controller.rb:32:in new' lib/redmine/sudo_mode.rb:63:insudo_mode'

Started GET "/redmine/admin/email_configurations/new" for 127.0.0.1 at 2016-08-16 09:44:56 +0200
Processing by EmailConfigurationsController#new as HTML
Current user: admin (id=1)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb (8.0ms)
Rendered plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb within layouts/base (9.0ms)
Completed 500 Internal Server Error in 43ms (ActiveRecord: 26.0ms)

ActionView::Template::Error (undefined method humanize' for nil:NilClass): 12: <p><%= f.select :flg_active, [['True', 'true'], ['False', 'false']], 13: { label: l(:field_flg_active), required: true } %> </p> 14: 15: <p> 16: <%= f.label '', { label: l(:field_last_fetch_at) } %> 17: <%- if @email_configuration.last_fetch_at.nil? %> 18: <%= '---' %> config/initializers/10-patches.rb:18:inhuman_attribute_name'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:15:in block in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb__591721709_54631896' app/helpers/application_helper.rb:1051:inlabelled_form_for'
plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb__591721709_54631896' plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb:3:in_plugins_redmine_email_fetcher_app_views_email_configurations_new_html_erb__910021370_54736716'
plugins/redmine_email_fetcher/app/controllers/email_configurations_controller.rb:32:in new' lib/redmine/sudo_mode.rb:63:insudo_mode'

I got the same error on redmine 3.3.0
Where did you get the log?

Hey i got it in the bitnami redmine log
C:\Bitnami\redmine-3.3.0-1\apps\redmine\htdocs\log\production.log

I'm getting this as well in 3.3.0. The plugin still works if there are active accounts that were added in 3.2.x, but managing accounts is not possible any more. View and Edit don't seem to work due to the error.

Processing by EmailConfigurationsController#edit as HTML
  Parameters: {"id"=>"1"}
  Current user: admin (id=1)
  Rendered plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb (4.6ms)
  Rendered plugins/redmine_email_fetcher/app/views/email_configurations/edit.html.erb within layouts/base (5.8ms)
Completed 500 Internal Server Error in 27ms (ActiveRecord: 14.5ms)

ActionView::Template::Error (undefined method `humanize' for nil:NilClass):
    12:         <p><%= f.select :flg_active, [['True', 'true'], ['False', 'false']],
    13:                         { label: l(:field_flg_active), required: true } %> </p>
    14: 
    15:         <p>
    16:           <%= f.label '', { label: l(:field_last_fetch_at) } %>
    17:           <%- if @email_configuration.last_fetch_at.nil? %>
    18:               <%= '---' %>
  config/initializers/10-patches.rb:18:in `human_attribute_name'
  plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:15:in `block in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___2331067409508071499_69982306275640'
  app/helpers/application_helper.rb:1051:in `labelled_form_for'
  plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in `_plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___2331067409508071499_69982306275640'
  plugins/redmine_email_fetcher/app/views/email_configurations/edit.html.erb:15:in `_plugins_redmine_email_fetcher_app_views_email_configurations_edit_html_erb___3652798560520439384_69982306640860'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Duplicate of issue #21. There is already a pull request to fix it: #22

Dear Developers, then issue will be fixed?

As I mentioned in #22, this fix has been applied and is also available for Redmine 4.0.x at https://github.com/octoquad/redmine_email_fetcher.

I'm not sure if there are still active Redmine 3.3.x users, but perhaps I can backport this fix to 0.3.x release.