luismaia/redmine_email_fetcher

Error when opening configuration page on Redmine 3.3

Opened this issue · 3 comments

When opening the configuration page (either a new config, or an existing config) there is an internal 500 error. This error is related to a specific commit on Redmine: redmine/redmine@223141a When rolling back this commit, the configuration page is working again.

The error in the log is:

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 _b49d41ec2e62041705b91ab5d943b271'
  app/helpers/application_helper.rb:1051:in 'labelled_form_for'
  plugins/redmine_email_fetcher/app/views/email_configurations/_form.html.erb:1:in '_b49d41ec2e62041705b91ab5d943b271'
  plugins/redmine_email_fetcher/app/views/email_configurations/edit.html.erb:15:in '_ee38734ab62e97590b2d9fa0a552e863'
  lib/redmine/sudo_mode.rb:63:in 'sudo_mode'

Getting the same error,

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

Back

ActionView::Template::Error (undefined methodhumanize' for nil:NilClass):
12:

<%= f.select :flg_active, [['True', 'true'], ['False', 'false']],
13: { label: l(:field_flg_active), required: true } %>


14:
15:


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:inblock in _plugins_redmine_email_fetcher_app_views_email_configurations__form_html_erb___3135960816507502372_70147740547980'
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___3135960816507502372_70147740547980'
plugins/redmine_email_fetcher/app/views/email_configurations/new.html.erb:3:in _plugins_redmine_email_fetcher_app_views_email_configurations_new_html_erb__2484072711416455569_70147740510720' plugins/redmine_email_fetcher/app/controllers/email_configurations_controller.rb:32:innew'
lib/redmine/sudo_mode.rb:63:in sudo_mode'

I use Redmine version 3.3.1
When adding a new configuration, I see the error
Redmine. Error 500
Global error
undefined method humanize 'for nil: NilClass /home/redmine/.rvm/gems/ruby-2.2.5/gems/activemodel-4.2.7.1/lib/active_model/translation.rb:63:inhuman_attribute_name '
/opt/redmine33/current/config/initializers/10-patches.rb:18:in human_attribute_name ' /home/redmine/.rvm/gems/ruby-2.2.5/gems/actionview-4.2.7.1/lib/action_view/helpers/tags/translator.rb:34:inhuman_attribute_name '

What's the problem?
Can you help?

Uploading error500.txt…