martin-denizet / wiking

Redmine 3.x compatible version of the WikiNG Redmine plugin by Andriy Lesyuk
GNU General Public License v2.0
5 stars 4 forks source link

Unable to view user's page #3

Closed robertomendozaphd closed 7 years ago

robertomendozaphd commented 7 years ago

Perhaps related to issue #2?

We are also unable to view any users page (redmine/users/XXXXX). Using Redmine 3.3.

I would really appreciate it if you could take a look?

Log file output:

Processing by UsersController#show as HTML
  Parameters: {"id"=>"XXXXX"}
  Current user: XXXXX (id=XX)
  Rendered plugins/wiking/app/views/users/_activity.html.erb (24.5ms)
  Rendered plugins/wiking/app/views/users/_mentions.html.erb (11.8ms)
  Rendered common/_tabs.html.erb (49.2ms)
  Rendered plugins/wiking/app/views/wiking/_mentions.html.erb (174.0ms)
  Rendered users/show.html.erb within layouts/base (758.6ms)
Completed 500 Internal Server Error in 1547ms (ActiveRecord: 134.3ms)

ActionView::Template::Error (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':conditions=>{:mentioned_id=>14}}) FROM `mentions`' at line 1: SELECT COUNT({:conditions=>{:mentioned_id=>14}}) FROM `mentions`):
     5: </div>
     6:
     7: <p>
     8:   <%= l(:label_total_number_of_mentions)%>: <%= Mention.count(:conditions => { :mentioned_id => @user.id }) %>
     9: </p>
    10:
    11: <div id="activity">
  plugins/wiking/app/views/users/_mentions.html.erb:8:in `_plugins_wiking_app_views_users__mentions_html_erb__3948862560731822480_70062464239060'
  app/views/common/_tabs.html.erb:17:in `block in _app_views_common__tabs_html_erb__777260913997655390_70062510501200'
  app/views/common/_tabs.html.erb:16:in `each'
  app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__777260913997655390_70062510501200'
  app/helpers/application_helper.rb:325:in `render_tabs'
  plugins/wiking/app/views/wiking/_mentions.html.erb:19:in `_plugins_wiking_app_views_wiking__mentions_html_erb__2318579750553764088_70062511631920'
  lib/redmine/hook/view_listener.rb:59:in `block (2 levels) in render_on'
  lib/redmine/hook/view_listener.rb:57:in `map'
  lib/redmine/hook/view_listener.rb:57: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:96:in `call_hook'
  app/views/users/show.html.erb:78:in `_app_views_users_show_html_erb___1231400984255334890_70062518765160'
  app/controllers/users_controller.rb:77:in `block (2 levels) in show'
  app/controllers/users_controller.rb:73:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Thank you.

addow commented 7 years ago

@robertomendozaphd I just sent PR #4 fixing the issue, I assume.