kubitron / redmine_git_hosting

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

Editing members when no repository is configured #85

Closed niosHD closed 12 years ago

niosHD commented 12 years ago

I just found another small bug by playing around with projects without configured repository.

When adding/deleting a member from/to a project without configured repository the following error can be found in the production.log:

Processing MembersController#new (for 192.168.1.107 at 2012-10-16 22:48:57) [POST]
  Parameters: {"authenticity_token"=>"ib5jVS32uO/qPBPECFsjmiHK+orMVIMk//8IPrINPrQ=", "member"=>{"user_ids"=>["3"], "role_ids"=>["3"]}, "id"=>"test", "principal_search"=>"", "controller"=>"members", "action"=>"new", "commit"=>"Add"}

ActionView::MissingTemplate (Missing template members/new.erb in view path vendor/plugins/redmine_git_hosting/app/views:app/views):
  app/controllers/application_controller.rb:518:in `default_template'
  passenger (3.0.17) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  [...]
  passenger (3.0.17) helper-scripts/passenger-spawn-server:99

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

On the first glance it does not seem to be related to the plugin at all. However, I made two fast test installations of redmine and redmine+git_hosting to verify that it is caused by the plugin.

Actually it is not a big issue for me. (Most of our projects use git repos anyway.) I just thought that you might be interested.

Steps to reproduce:

  1. Create a new project ("Automatically Initialize Git Repositories For New Projects = Disabled")
  2. Goto Project Settings -> Members and add a new member.
kubitron commented 12 years ago

Nice! That is a bug that's been around for a bit (guess not to many people have tried what you did). Thanks for finding it.

Try pulling from master. Should fix it.

niosHD commented 12 years ago

Works like a charm.

We still have one or two projects which use redmine only as issue tracker (or with svn). For those this operation can actually happen.

Anyway, thanks for this instant fix! You are the best!

kubitron commented 12 years ago

No worries. Always happy that someone is actually using my code. Thanks for the debug.

Let me know if you have more problems. There was a lot of code reorganization to make Redmine 1.4 work, and it is nice that you are shaking out the backward compatibility issues with Redmine 1.3 (wasn't my intention to break things, but it happens).