kubitron / redmine_git_hosting

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

error on update user within admin area #57

Closed gituser closed 12 years ago

gituser commented 12 years ago

i get this in production.log when I try to update user within Administration area (i.e. change user name or anything):

Rendering template within layouts/admin
Rendering users/edit

ActionView::TemplateError (undefined method `empty?' for nil:NilClass) on line #7 of vendor/plugins/redmine_git_hosting/app/views/gitolite_public_keys/_view.html.erb:
4: 
5: <fieldset class="public_key_view"><legend><%= l(:label_current_public_keys)%></legend>
6: <table class="list">
7:  <% if @gitolite_public_keys.empty? %>
8:      <tr><td><label><%=l(:label_no_public_keys)%></label></td></tr>
9:  <%end %>
10:     <% @gitolite_public_keys.each do |key| %>

    vendor/plugins/redmine_git_hosting/app/views/gitolite_public_keys/_view.html.erb:7
    app/views/common/_tabs.html.erb:24
    app/views/common/_tabs.html.erb:23:in `each'
    app/views/common/_tabs.html.erb:23
    app/helpers/application_helper.rb:222:in `render_tabs'
    app/views/users/edit.html.erb:9
    app/controllers/users_controller.rb:178:in `update_without_disable_update'
    app/controllers/users_controller.rb:177:in `update_without_disable_update'
    unicorn (4.3.1) lib/unicorn/http_server.rb:531:in `process_client'
    unicorn (4.3.1) lib/unicorn/http_server.rb:606:in `worker_loop'
    unicorn (4.3.1) lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
    unicorn (4.3.1) lib/unicorn/http_server.rb:137:in `start'
    unicorn (4.3.1) bin/unicorn_rails:209
    /var/lib/gems/1.8/bin/unicorn_rails:19:in `load'
    /var/lib/gems/1.8/bin/unicorn_rails:19

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)
kubitron commented 12 years ago

Can you tell me more information? Which version of the plugin? Which version of redmine? (actually, can you execute the ./script/about and tell me what the output is)? Do this:

sh -c "RAILS_ENV=production ./script/about"
gituser commented 12 years ago
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.1.3
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /var/www/redmine
Environment               production
Database adapter          mysql
Database schema version   20120422150750

About your Redmine plugins
Redmine Git Hosting Plugin   0.4.5x
Redmine Pastebin plugin      0.0.1

It's from the latest SVN, I did update the plugin before posting here an issue.

kubitron commented 12 years ago

And which version of Redmine are you using?

gituser commented 12 years ago
$ svn info
Path: .
URL: http://redmine.rubyforge.org/svn/branches/1.3-stable
Repository Root: http://redmine.rubyforge.org/svn
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 9877
kubitron commented 12 years ago

Is this the first time you have tried this combination? It should work.

Could you try installing without the Pastebin plugin?

gituser commented 12 years ago

I think I found the issue.

It breaks if there is password input filled (it's pre-filled here in Firefox), if I erase data in password field it gets updated fine.

It's a bug actually - should warn that 'repeat-password' is not filled. But from what I see from production.log it seems redmine_git_hosting plugin involved.

kubitron commented 12 years ago

Hm... I see this. Will fix.

kubitron commented 12 years ago

Try the latest version from head of master. It should work now (i.e. your case should generate a failed validation -- namely when you have the password filled but not the confirmation password).

I'm going to close this now.

gituser commented 12 years ago

thanks john, it works!

kubitron commented 12 years ago

Great! Sorry about that...

kubitron commented 12 years ago

Can you repull? I fixed a typo in another commit that I put up at the same time. This will cause a conflict, so you should:

git reset --hard HEAD~2
git pull
gituser commented 12 years ago

mm not sure what did you mean?

it worked for me even with previous release..

check another ticket about redmine 1.4 and a new bug I've found..

anyway i've reverted to HEAD~2 and updated, thanks for this..

kubitron commented 12 years ago

Not a bug you would notice. Just that it was a typo and i changed my history (normally a bad thing to do).

I saw your other comment. Still cleaning up bugs in 1.3. Will get to 1.4 soon.