500 Error on Issue Display? (Subtask problem?)
Added by Joseph Weissman over 12 years ago
This seems only to affect issues with parent or child tasks; at least it's not every single issue, but I'm getting a 500 error anytime I try to examine/edit/copy one of these action items. The trace from production.log is appended below.
Processing IssuesController#show (for 192.168.130.101 at 2012-03-28 15:47:17) [GET]
Parameters: {"action"=>"show", "controller"=>"issues", "id"=>"2302"}
Rendering template within layouts/base
Rendering issues/show.rhtml
ActionView::TemplateError (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, `iss
ues`.`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, `is
sues`.`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`.`position` AS
t0_r22, `issues`.`story_points` AS t0_r23, `issues`.`remaining_hours` AS t0_r24, `issues`.`is_private` 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, `pro
jects`.`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 (((projects.status=1 AND projects.id
IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.id != 2302)) AND ((issues.`lft` >= 1 AND issues.`rgt` <= 4) AND (`issues`.`root_id` = 2302))) ORDER BY `lft`) on line #72 of app/views/issues/show.rhtml:
69: <%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) >
70: </div>
71: <p><strong><=l(:label_subtask_plural)%></strong></p>
72: <%= render_descendants_tree(@issue) unless @issue.leaf? >
73: </div>
74: < end %>
75:
app/helpers/issues_helper.rb:80:in `render_descendants_tree'
app/views/issues/show.rhtml:72:in `_run_rhtml_app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:121
app/controllers/issues_controller.rb:120:in `show'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61
Rendering /usr/share/redmine-1.2.0/public/500.html (500 Internal Server Error)
This feels similar to this issue to me -- http://www.redmine.org/issues/8508 -- and we did perform an upgrade from a 0.x version about a year or so back. (Though I haven't been able to identify where we might have introduced the problem.) Here are some more details on my setup:
- Redmine version 1.2.0
- Ruby 1.8.7
Please let me know if there's anything else that might be helpful in reproducing this, or identifying the root cause. Thanks in advance.
Replies (1)
RE: 500 Error on Issue Display? (Subtask problem?)
-
Added by Joseph Weissman over 12 years ago
Here are the details of my environment (from script/about):
About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.4.2
Rack version 1.1.2
Rails version 2.3.11
Active Record version 2.3.11
Active Resource version 2.3.11
Action Mailer version 2.3.11
Active Support version 2.3.11
Edge Rails revision unknown
Application root /usr/share/redmine-1.2.0
Environment production
Database adapter mysql
Database schema version 20110511000000
About your Redmine plugins
Redmine Pastebin plugin 0.0.1
Redmine Hudson plugin 1.0.7
Redmine Equipment Status Viewer plugin 0.3.5
Redmine Backlogs master branch (unstable)
Redmine Graphs plugin 0.1.0
Redmine Theme Changer plugin 0.0.2
Redmine Close Button plugin 0.0.4