fernandokosh / redmine_time_tracker

A time tracker plugin for Redmine
Other
203 stars 141 forks source link

Internal Server Error on Login #17

Closed pageworthy closed 14 years ago

pageworthy commented 14 years ago

I've recently installed the plugin to a redmine 0.9.4 install and I noticed that when I start the clock on an issue I get a 500 error (just a small error message at the top of the screen), then if I refresh the page it acts normal and the clock starts. This also prevents me from adding users or groups as members of a project, not sure why. Here is the error in the logs.

NoMethodError (undefined method []' for nil:NilClass): vendor/plugins/redmine_time_tracker/app/controllers/time_trackers_controller.rb:75:inapply_status_transition' vendor/plugins/redmine_time_tracker/app/controllers/time_trackers_controller.rb:14:in start' passenger (2.2.8) lib/phusion_passenger/rack/request_handler.rb:92:inprocess_request' passenger (2.2.8) lib/phusion_passenger/abstract_request_handler.rb:207:in main_loop' passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:385:instart_request_handler' passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:177:in spawn_application!' passenger (2.2.8) lib/phusion_passenger/utils.rb:184:insafe_fork' passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:153:in spawn_application!' passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:272:inspawn_rails_application' passenger (2.2.8) lib/phusion_passenger/abstract_server_collection.rb:80:in synchronize' passenger (2.2.8) lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize' passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:255:in spawn_rails_application' passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:154:inspawn_application' passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:287:in handle_spawn_application' passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:insend' passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in main_loop' passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:196:instart_synchronously'

Rendering /home/page1/webapps/redmine/redmine-0.9.4/public/500.html (500 Internal Server Error)

Processing TimeTrackersController#render_menu (for 173.10.30.94 at 2010-05-08 00:41:41) [POST] Parameters: {"project_id"=>"5", "action"=>"render_menu", "authenticity_token"=>"8yxEo84YCyoq/7VX1XIYXFbgi0GxAMrULUz5d0kfsYI=", "controller"=>"timetrackers", ""=>""} Completed in 5ms (View: 3, DB: 1) | 200 OK [My_project_url/time_trackers/render_menu?project_id=5]

delaitre commented 14 years ago

Looks like the "status_transitions" settings is not available. Adding "return if Setting.plugin_redmine_time_tracker['status_transitions'].nil?" before line 75 in app/controllers/time_trackers_controller should temporarily fix the bug (not tested though). Before trying this, can you try to go in the plugin settings (admin->plugins->time tracker configure) and validate the form (without adding status transitions)?

delaitre commented 14 years ago

I have tested on a fresh redmine 0.9.4 and did not get any error. However, as I have added new settings (for status transitions), maybe it needs some migration procedure. Any hints somebody?

delaitre commented 14 years ago

For those interested, adding a transition (maybe even without) and validating ("save" button) the plugin settings seems to work. I will investigate further to see if a migration process is required.

delaitre commented 14 years ago

Apparently, restarting redmine is required too...

delaitre commented 14 years ago

Should be fixed now.