msjit / testcasedb

TestCaseDB - Web based test case management
MIT License
40 stars 18 forks source link

An error has occured when clicked on "My Settings" link #26

Closed kirantpatil closed 10 years ago

kirantpatil commented 10 years ago

Steps to reproduce:

1) Login as admin with google auth 2) Click on "My Settings" link

Error message on Unicorn log file:

Started GET "/" for 127.0.0.1 at 2014-07-29 13:49:58 -0400 Started GET "/login?referer=%2F" for 127.0.0.1 at 2014-07-29 13:49:59 -0400 Started GET "/auth/google_oauth2" for 127.0.0.1 at 2014-07-29 13:50:02 -0400 (google_oauth2) Request phase initiated. Started GET "/auth/google_oauth2/callback?state=778d02b69dbff48c91b978de16af075fec7e51f438d36849&code=4/UKO9fC1eiaAsUn41RZrXOFiD0VgF.QjH99-XA7dcVgrKXntQAax1-QYAGjwI" for 127.0.0.1 at 2014-07-29 13:50:03 -0400 (google_oauth2) Callback phase initiated. Started GET "/" for 127.0.0.1 at 2014-07-29 13:50:17 -0400 Started GET "/my_settings" for 127.0.0.1 at 2014-07-29 13:50:26 -0400

ActionView::Template::Error (PG::UndefinedColumn: ERROR: column authentications.Provider does not exist LINE 1: ...tions" WHERE "authentications"."user_id" = 1 AND "authentic... ^ : SELECT "authentications".* FROM "authentications" WHERE "authentications"."user_id" = 1 AND "authentications"."Provider" = 'google_oauth2' LIMIT 1): 13:

14: <% if @google_auth_enabled %> 15:
16: <% if @user.auth_for('google_oauth2') %> 17:

Unlink existing authentication:

18: <%= link_to image_tag("auth/google_oauth2_64.png"), delete_auth_for(@user, 'google_oauth2') %> 19: <% else %> app/models/user.rb:27:in auth_for' app/views/users/my_settings.html.erb:16:in_app_views_users_my_settings_html_erb__2488129487206305123_50233260'

joffems commented 10 years ago

This issue was fixed in commit https://github.com/msjit/testcasedb/commit/b909b429f230f4af4ed9e066222778d98718eb38

The issue was related to a typo that was breaking my_settings with Postgres. Postgres is case sensitive for column names.

kirantpatil commented 10 years ago

The fix has been verified and the issue is fixed.