Project

General

Profile

MyPage is broken HELP

Added by Dmitry Dovnar over 13 years ago

I install plugin "redmine_last_messages" and after I have personally set up the page it stops working and gives an error:

ActiveRecord::StatementInvalid in My#page

Showing vendor/plugins/redmine_last_messages/app/views/my/blocks/_forum_messages.html.erb where line #1 raised:

Mysql::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 '))  ORDER BY messages.created_on DESC LIMIT 5' at line 1: SELECT `messages`.`id` AS t0_r0, `messages`.`board_id` AS t0_r1, `messages`.`parent_id` AS t0_r2, `messages`.`subject` AS t0_r3, `messages`.`content` AS t0_r4, `messages`.`author_id` AS t0_r5, `messages`.`replies_count` AS t0_r6, `messages`.`last_reply_id` AS t0_r7, `messages`.`created_on` AS t0_r8, `messages`.`updated_on` AS t0_r9, `messages`.`locked` AS t0_r10, `messages`.`sticky` AS t0_r11, `users`.`id` AS t1_r0, `users`.`login` AS t1_r1, `users`.`hashed_password` AS t1_r2, `users`.`firstname` AS t1_r3, `users`.`lastname` AS t1_r4, `users`.`mail` AS t1_r5, `users`.`admin` AS t1_r6, `users`.`status` AS t1_r7, `users`.`last_login_on` AS t1_r8, `users`.`language` AS t1_r9, `users`.`auth_source_id` AS t1_r10, `users`.`created_on` AS t1_r11, `users`.`updated_on` AS t1_r12, `users`.`type` AS t1_r13, `users`.`identity_url` AS t1_r14, `users`.`mail_notification` AS t1_r15, `boards`.`id` AS t2_r0, `boards`.`project_id` AS t2_r1, `boards`.`name` AS t2_r2, `boards`.`description` AS t2_r3, `boards`.`position` AS t2_r4, `boards`.`topics_count` AS t2_r5, `boards`.`messages_count` AS t2_r6, `boards`.`last_message_id` AS t2_r7 FROM `messages`  LEFT OUTER JOIN `users` ON `users`.id = `messages`.author_id AND  (`users`.`type` = 'User' OR `users`.`type` = 'AnonymousUser' )  LEFT OUTER JOIN `boards` ON `boards`.id = `messages`.board_id WHERE (boards.project_id in ())  ORDER BY messages.created_on DESC LIMIT 5

Extracted source (around line #1):

1: <% messages = Message.find(:all, :limit => 5,
2:                            :order => "#{Message.table_name}.created_on DESC",
3:                            :conditions => "#{Board.table_name}.project_id in (#{User.current.projects.collect{|m| m.id}.join(',')})",
4:                            :include => [:author, :board]) %>

Trace of template inclusion: app/views/my/page.rhtml


Replies (2)

RE: MyPage is broken HELP - Added by Dmitry Dovnar over 13 years ago

But under the other user works fine!

RE: MyPage is broken HELP - Added by Dmitry Dovnar over 13 years ago

how do I reset a user who is not working?

    (1-2/2)