500 internal error issues
Added by Kelly Goedert over 12 years ago
Hi
I am using redmine 2.0.3 and some of my project issues when clicked show me a 500 internal error. Looking at the logs I see this messages
0.3/app/views/issues/_action_menu.html.erb:6)
Rendered issues/_action_menu.html.erb (5.4ms)
Rendered issues/show.html.erb within layouts/base (11.4ms)
Completed 500 Internal Server Error in 341ms
ActionView::Template::Error (Mysql::Error: Column 'lft' in order clause is ambiguous: SELECT `issues`.`id` AS t0_r0, `issues`.`tracker_id` AS t0_r1, `issues`.`project_id` AS t0_r2, `issues`.`subject` AS t0_r3, `issues`.`description` AS t0_r4, `issues`.`due_date` AS t0_r5, `issues`.`category_id` AS t0_r6, `issues`.`status_id` AS t0_r7, `issues`.`assigned_to_id` AS t0_r8, `issues`.`priority_id` AS t0_r9, `issues`.`fixed_version_id` AS t0_r10, `issues`.`author_id` AS t0_r11, `issues`.`lock_version` AS t0_r12, `issues`.`created_on` AS t0_r13, `issues`.`updated_on` AS t0_r14, `issues`.`start_date` AS t0_r15, `issues`.`done_ratio` AS t0_r16, `issues`.`estimated_hours` AS t0_r17, `issues`.`parent_id` AS t0_r18, `issues`.`root_id` AS t0_r19, `issues`.`lft` AS t0_r20, `issues`.`rgt` AS t0_r21, `issues`.`is_private` AS t0_r22, `issues`.`position` AS t0_r23, `issues`.`remaining_hours` AS t0_r24, `issues`.`story_points` AS t0_r25, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11 FROM `issues` LEFT OUTER JOIN `projects` ON `projects`.`id` = `issues`.`project_id` WHERE `issues`.`root_id` = 223 AND (`issues`.`lft` <= 14 AND `issues`.`rgt` >= 15) AND (`issues`.id != 230) AND (projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) ORDER BY `lft`):
22: <%= avatar(@issue.author, :size => "50") >
23:
24: <div class="subject">
25: <= render_issue_subject_with_tree(@issue) >
26: </div>
27: <p class="author">
28: <= authoring @issue.created_on, @issue.author %>.
app/helpers/issues_helper.rb:66:in `render_issue_subject_with_tree'
app/views/issues/show.html.erb:25:in `_app_views_issues_show_html_erb__1445535340_70236311509160'
app/controllers/issues_controller.rb:118:in `show'
app/controllers/issues_controller.rb:115:in `show'
Can somebody help?
Thanks
Kelly
Replies (4)
RE: 500 internal error issues - Added by Jan Niggemann (redmine.org team member) over 12 years ago
The problem is the ORDER BY `lft`
part, because it's missing its alias. There are 2 columns called 'lft', one in issues, and one in projects and the database engine can't decide which of both to use for the order clause...
Do you have any plugins installed recently? Did it work before? Did you change something recently?
RE: 500 internal error issues - Added by Steve F. over 12 years ago
added new 'Milestones' plugin
then it started
RE: 500 internal error issues - Added by Jan Niggemann (redmine.org team member) over 12 years ago
Does everything work again if you remove said plugin?
RE: 500 internal error issues - Added by Steve F. over 12 years ago
fixed by author in latest version