Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error on rendering Issue Page #24

Open
PsykomantaBrain opened this issue Sep 1, 2014 · 0 comments
Open

Internal Server Error on rendering Issue Page #24

PsykomantaBrain opened this issue Sep 1, 2014 · 0 comments

Comments

@PsykomantaBrain
Copy link

Hi,

Just installed the plugin here (Redmine version 2.3.0 and 2.3.4, both present same issue), and although everything seems to indicate the installation went well, I'm getting a 500 error on trying to open any issue page on projects where issue voting is enabled.

Looking at the logs, I'm seeing the following message:

Started GET "/issues/2896" for 201.141.13.177 at 2014-09-01 12:34:22 -0500
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"2896"}
  Current user: HarvesteR (id=3)
  Rendered issues/_action_menu.html.erb (3.6ms)
  Rendered plugins/redmine_vote/app/views/issues/_voting_controls.html.erb (80.6ms)
  Rendered plugins/redmine_vote/app/views/issues/_issue_voting.html.erb (81.2ms)
  Rendered issues/show.html.erb within layouts/base (103.2ms)
Completed 500 Internal Server Error in 261ms

ActionView::Template::Error (Mysql2::Error: Unknown column 'votes.voteable_id' in 'where clause': SELECT `votes`.* FROM `votes`  WHERE `votes`.`voteable_id` = 2896 AND `votes`.`voteable_type` = 'Issue'):
    1: <% vv = @issue.votes_value %>
    2: <%= content_tag('span', vv, :class => (vv > 0? 'votes-positive': ( vv < 0 ? 'votes-negative' : ''))) %>
    3: <%= content_tag('span', " (" + @issue.votes_for.to_s + "/" + @issue.votes_count.to_s + ", " + @issue.votes_percent.round(1).to_s + "%)") %>
    4:
    5: <% @project = @issue.project %>
    6: <%= javascript_include_tag('votes', :plugin => 'redmine_vote') %>
  lib/redmine/hook.rb:111:in `block in render_on'
  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:158:in `call_hook'
  app/views/issues/show.html.erb:68:in `_app_views_issues_show_html_erb___3318095330046650493_51831860'
  app/controllers/issues_controller.rb:119:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:116:in `show'

Maybe something went wrong in migrating the database? Disabling the module on the project causes the pages to work normally again, but of course, without any voting controls.

Other points that may be relevant, on the main issues list page, I am able to enable votes as a column for sorting, and that draws just fine. The admin/about page shows the plugin is installed and all requirements on that page are ticked green:

Environment:
  Redmine version                          2.3.0.stable
  Ruby version                             1.9.3 (x86_64-linux)
  Rails version                            3.2.13
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  redmine_vote                             0.0.3

Many thanks in advance for any help with this issue.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant