upgradeya / redmine-contracts-with-time-tracking-plugin

A Redmine plugin that allows you to manage contracts and associate time-entries with those contracts.
35 stars 22 forks source link

new redmine installation ,and login with admin occur 500 error #59

Closed archonwang closed 7 years ago

archonwang commented 7 years ago

@wesoccer2003 , @upgradeya ,@FireMartZ, please help to check it. Thanks. error log when install new redmine environment ,and log with admin, occur 500 error.

Started POST "/login" for 192.168.20.231 at 2017-03-27 03:54:59 +0000
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Kxxiy30dCpuSn+2Spc0TQckEM+h2etBSQ52ynweTyP5v7QmscobcNsGgr/de+NB/7sdOO2Zu/TofmhzF/cEntA==", "back_url"=>"http://192.168.1.9:10000/", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"login »"}
  Current user: anonymous
Successful authentication for 'admin' from 192.168.20.231 at 2017-03-27 03:54:59 UTC
Completed 500 Internal Server Error in 18ms (ActiveRecord: 4.9ms)

TypeError (no implicit conversion of Symbol into Integer):
  plugins/contracts/lib/contracts/hooks/hooks.rb:54:in `[]'
  plugins/contracts/lib/contracts/hooks/hooks.rb:54:in `controller_account_success_authentication_after'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:91:in `call_hook'
  app/controllers/account_controller.rb:272:in `successful_authentication'
  app/controllers/account_controller.rb:213:in `password_authentication'
  app/controllers/account_controller.rb:199:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
FireMartZ commented 7 years ago

Please post your redmine, ruby and rails versions available at yourhost.com/admin/info.

archonwang commented 7 years ago

Hi, @FireMartZ , Thanks. my environment is

Environment:
  Redmine version                3.3.3.stable.16542
  Ruby version                   2.2.4-p230 (2015-12-16) [x86_64-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
wesley-jones commented 7 years ago

Hey Steven,

I think this is the same issue as before. You will need to comment out those two lines of code.

On Apr 14, 2017, at 2:15 AM, Steven.W notifications@github.com wrote:

Hi, @FireMartZ , Thanks. my environment is

Environment: Redmine version 3.3.3.stable.16542 Ruby version 2.2.4-p230 (2015-12-16) [x86_64-linux] Rails version 4.2.7.1 Environment production Database adapter Mysql2 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

archonwang commented 7 years ago

@wesoccer2003 ,

or I should comment the line 54 or other in plugins/contracts/lib/contracts/hooks/hooks.rb?

wesley-jones commented 7 years ago

Follow the same steps we did here https://github.com/upgradeya/redmine-contracts-with-time-tracking-plugin/issues/57

On Apr 14, 2017, at 10:32 PM, Steven.W notifications@github.com wrote:

@wesoccer2003 ,

or I should comment the line 54 or other in plugins/contracts/lib/contracts/hooks/hooks.rb?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

archonwang commented 7 years ago

OK, I retried and it worked . Thanks.