kubitron / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
78 stars 15 forks source link

Automatic settings page reload crashes when adding member to project #77

Closed niosHD closed 11 years ago

niosHD commented 11 years ago

Sorry to bother you again but I came across a new problem just now when I added a new member to one of our projects. After clicking the add button the animation pops up shortly but the page is not refreshed as usual. When the settings page is refreshed by hand the new user is displayed as expected.

However, looking at the log the following error could be found:

Processing MembersController#new (for 193.170.226.203 at 2012-10-10 20:04:45) [POST]
  Parameters: {"id"=>"demo", "action"=>"new", "authenticity_token"=>"GJazyE2JexnLhF5Vn3yzky3jk4D2xd6xmsxl6xcw8M8=", "principal_search"=>"", "member"=>{"role_ids"=>["3"], "user_ids"=>["16"]}, "controller"=>"members", "commit"=>"Add"}

NameError (uninitialized constant GitHosting::Patches::MembersControllerPatch::Page):
  app/controllers/members_controller.rb:44:in `new_without_disable_update'
  app/controllers/members_controller.rb:38:in `new_without_disable_update'
  passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.11) helper-scripts/passenger-spawn-server:99

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

Editing the user role crashes in a similar way: (log entry omitting the most passenger stuff)

Processing MembersController#edit (for 193.170.226.203 at 2012-10-10 20:09:23) [POST]
  Parameters: {"id"=>"60", "action"=>"edit", "authenticity_token"=>"GJazyE2JexnLhF5Vn3yzky3jk4D2xd6xmsxl6xcw8M8=", "member"=>{"role_ids"=>["3", ""]}, "controller"=>"members", "commit"=>"Change"}

NameError (uninitialized constant GitHosting::Patches::MembersControllerPatch::Page):
  app/controllers/members_controller.rb:74:in `edit_without_disable_update'
  app/controllers/members_controller.rb:71:in `edit_without_disable_update'
  passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  [...]
  passenger (3.0.11) helper-scripts/passenger-spawn-server:99

Rendering /var/redmine-1.3.2/public/500.html (500 Internal Server Error)
kubitron commented 11 years ago

Ah... That is a bug. I'll fix it in an hour or so.

I guess my Redmine 1.3 installation is more hybrid than I thought.

kubitron commented 11 years ago

Ok. Try pulling from head of master again.

Thanks for your patience. You are finding residual problems with backward compatibility. I appreciate it (clearly there were still bugs in this code -- really sorry).

niosHD commented 11 years ago

Works like a charm! Thank you for the quick fix!

kubitron commented 11 years ago

Glad to hear it!

Please post other errors as you find them.. (As I mentioned, you are my most active pre 1.4 tester at the moment -- most others are probably sticking with version 0.4.6x).