Project

General

Profile

Help!! ActionView::TemplateError (undefined method `module_enabled?' for nil:NilClass) error in a plugin that I'm working on.

Added by Enrique Delgado over 13 years ago

I made a plugin for redmine that I'm having some issues with after upgrading from 0.8.4 to 1.0.0 (RC).

Basically, the plugin has a view to create issues, but with less fields (does not give the user the option to specify priorities, trackers, or anything, I do all that in the controller).

There is one line in my view that I copied from the <REDMINE ROOT>/app/views/issues/_form.rhtml partial into my view:

<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>

Which used to work fine; I think it allows for other plugins to add fields to the bottom of the issue creation form.

But now, I get this error when I try to go to my view:

Processing RequestsController#details (for 10.24.250.62 at 2010-07-23 18:34:46) [GET]
  Parameters: {"action"=>"details", "controller"=>"requests"}
Rendering template within layouts/base
Rendering requests/details

ActionView::TemplateError (undefined method `module_enabled?' for nil:NilClass) on line #35 of vendor/plugins/redmine-webcontent-plugin/app/views/requests/details.html.erb:
33:         <% end %>
34: 
35:         <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
36: 
37:         <%= wikitoolbar_for 'issue_description' %>
38:

    lib/redmine/hook.rb:63:in `send'
    lib/redmine/hook.rb:63:in `call_hook'
    lib/redmine/hook.rb:63:in `each'
    lib/redmine/hook.rb:63:in `call_hook'
    lib/redmine/hook.rb:60:in `call_hook'
    lib/redmine/hook.rb:144:in `call_hook'
    vendor/plugins/redmine-webcontent-plugin/app/views/requests/details.html.erb:35
    app/helpers/application_helper.rb:669:in `labelled_tabular_form_for'
    vendor/plugins/redmine-webcontent-plugin/app/views/requests/details.html.erb:4
    vendor/plugins/redmine-webcontent-plugin/app/controllers/requests_controller.rb:58:in `details'
    passenger (2.2.4) lib/phusion_passenger/rack/request_handler.rb:91:in `process_request'
    passenger (2.2.4) lib/phusion_passenger/abstract_request_handler.rb:206:in `main_loop'
    passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:376:in `start_request_handler'
    passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application'
    passenger (2.2.4) lib/phusion_passenger/utils.rb:182:in `safe_fork'
    passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `__send__'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `main_loop'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:195:in `start_synchronously'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:162:in `start'
    passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
    passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:261:in `spawn_rails_application'
    passenger (2.2.4) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    passenger (2.2.4) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    passenger (2.2.4) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application'
    passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:153:in `spawn_application'
    passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:286:in `handle_spawn_application'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `__send__'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `main_loop'
    passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:195:in `start_synchronously'

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)

I'm not sure where or why nil is being passed to a module object, or how to fix it... I was wondering if anyone could point me in the right direction.

Thanks in advance! :)


Replies (1)

RE: Help!! ActionView::TemplateError (undefined method `module_enabled?' for nil:NilClass) error in a plugin that I'm working on. - Added by Felix Schäfer over 13 years ago

Make sure the remaining software versions are all at the right version, other than that, edavis10 on IRC will probably be able to help you further.

    (1-1/1)