kubitron / redmine_git_hosting

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

500 Internal Server Error when applying filter to user list in "Administration -> Users" #69

Closed saric closed 11 years ago

saric commented 11 years ago

My Redmine config:

Testing was done on clean Redmine installation (fresh install without any other plugins) and using redmine_git_hosting from testing branch.

When I click "Apply" button in "Administration -> Users" (to filter user list by username), Redmine gives 500 Internal Server Error.

Logged error in production.log:

Processing UsersController#index (for 192.168.239.45 at 2012-09-26 16:20:34) [GET]
  Parameters: {"action"=>"index", "status"=>"1", "name"=>"a", "controller"=>"users"}

NoMethodError (undefined method `call' for nil:NilClass):
  app/controllers/users_controller.rb:44:in `index'
  passenger (3.0.12) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
...

I've noticed the similar error as in redmine_ldap_sync plugin (resolved): https://github.com/thorin/redmine_ldap_sync/issues/42

frasten commented 11 years ago

This issue could be related to #67.

kubitron commented 11 years ago

Could you pull the latest from 'testing' and see if the error is still there?

frasten commented 11 years ago

Hi, unfortunately running commit b445672b92 the issue is still here: http://pastie.org/4810293

kubitron commented 11 years ago

Yup. I have reproduced it. Sorry for the delay. I'll get to it as soon as I can (may not be for a couple of hours).

Really sorry for this speed-bump. Lots of code got changed in this upgrade.

kubitron commented 11 years ago

Ok. Give this a try. Your pointer to thorin/redmine_ldap_sync#42 was useful, but not entirely sure why this matters (ah the mysteries of Rails).

kubitron commented 11 years ago

(p.s. I meant try the testing branch again).

frasten commented 11 years ago

Using commit 81895d3, same issue. Here is the log: http://pastie.org/4825230

saric commented 11 years ago

I've upgraded to commit 81895d3, and it is working fine now.

kubitron commented 11 years ago

Great! I'm going to close this bug.

kubitron commented 11 years ago

So -- any more issues with the plugin? Is it working?

frasten commented 11 years ago

Unfortunately, I'm still affected from this bug. :-( Using commit 2591c8f32100, testing branch. This is my script/about, and this is the log (in debug mode) when typing admin in the filter field and hitting enter. Thank you!

saric commented 11 years ago

I use very similar config, with following differences:

kubitron commented 11 years ago

@frasten, can you try removing the other two plugins (i.e. keep redmine_git_hosting)? This bug is a very weird problem that plugins seem to cause.

frasten commented 11 years ago

@kubitron: sure, now I've tried to remove the other plugins. script/about says that only redmine_git_hosting is installed, but I've been able to reproduce the same issue. Note that in my case this isn't a showstopper for sure: I've only a handful of users :-) .

kubitron commented 11 years ago

@frasten, can you make sure that you have the fix? Look at:

vendor/plugins/redmine_git_hostin/lib/git_hosting/patches/user_patch.rb

At the top, it should say:

require_dependency 'project'
require_dependency 'git_hosting'

It should not say:

require_dependency 'principle'
require_dependency 'user'
require_dependency 'git_hosting'
frasten commented 11 years ago

That file is exactly like you said. I retried again, but I still get a 500 error.

kubitron commented 11 years ago

Hm... I compared our installations. My rubyGems is version 1.8.21 and it seems to work. Perhaps you could try upgrading? @saric, what version of rubyGems are you using?

saric commented 11 years ago

Hi John, as I said, I'm using RubyGems v1.8.12.

kubitron commented 11 years ago

@saric, question for you -- since you are using passenger, have you gotten the Web view of repositories working? I have a tester that is experiencing problems that seem to be related to the setting of $HOME (although I haven't verified this yet).

p.s. Missed your earlier comment on RubyGems version. @frasten, see if upgrading RubyGems helps...

frasten commented 11 years ago

@kubitron : Upgraded to RubyGems v1.8.21: http://pastie.org/4855848, but this issue is still here.

kubitron commented 11 years ago

@saric, I did something different to fix this problem. Can you grab from the head of the testing branch and see if the problem is still fixed?