Defect #9164
closedInternal Error when opening Issues or Gantt
0%
Description
Hello together,
i hope somebody can help me. On one of thirty active projects i get an "Internal Error" when i try to open Issues or Gantt.
The Server is a Suse 11.4 with the current BitNami Stack:
Redmine 1.2.1 (2011-07-11)
Database: MySQL 5.1.56 for pc-linux-gnu on i686 (MySQL Community Server (GPL))
Ruby: ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
Rails: 2.3.11
When i open the Gantt Chart i get the following Error:
------------------------------------------------------------------
Processing GanttsController#show (for 81.223.151.146 at 2011-08-12 11:13:22) [GET]
Parameters: {"project_id"=>"newproductsuntory", "action"=>"show", "controller"=>"gantts"}
Rendering template within layouts/base
Rendering gantts/show
ActionView::TemplateError (comparison of Issue with Issue failed) on line #54 of app/views/gantts/show.html.erb:
51: # Width of the entire chart
52: g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom
53:
54: @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width)
55:
56: g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max
57: t_height = g_height + headers_height
lib/redmine/helpers/gantt.rb:673:in `sort!'
lib/redmine/helpers/gantt.rb:673:in `sort_issues!'
lib/redmine/helpers/gantt.rb:204:in `render_project'
lib/redmine/helpers/gantt.rb:184:in `render'
app/models/project.rb:664:in `project_tree'
app/models/project.rb:660:in `each'
app/models/project.rb:660:in `project_tree'
lib/redmine/helpers/gantt.rb:182:in `render'
app/views/gantts/show.html.erb:54
app/controllers/gantts_controller.rb:43:in `show'
app/controllers/gantts_controller.rb:42:in `show'
config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'
Rendering /opt/redmine/apps/redmine/public/500.html (500 Internal Server Error)
------------------------------------------------------------------
Wen i open the Issue Chart i get the following Error:
------------------------------------------------------------------
Processing IssuesController#index (for 81.223.151.146 at 2011-08-12 11:13:16) [GET]
Parameters: {"project_id"=>"newproductsuntory", "set_filter"=>"1", "action"=>"index", "tracker_id"=>"1", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index.rhtml
ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #28 of app/views/issues/_list.rhtml:
25: </tr>
26: <% previous_group = group >
27: < end >
28: <tr id="issue-<= issue.id >" class="hascontextmenu <= cycle('odd', 'even') > <= issue.css_classes > <= level > 0 ? "idnt idnt-#{level}" : nil >">
29: <td class="checkbox hide-when-print"><= check_box_tag("ids[]", issue.id, false, :id => nil) ></td>
30: <td class="id"><= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue ></td>
31: < query.columns.each do |column| ><= content_tag 'td', column_content(column, issue), :class => column.css_classes >< end %>
app/models/issue.rb:578:in `css_classes'
app/views/issues/_list.rhtml:28:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
app/helpers/issues_helper.rb:27:in `issue_list'
app/helpers/issues_helper.rb:23:in `each'
app/helpers/issues_helper.rb:23:in `issue_list'
app/views/issues/_list.rhtml:16:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
app/views/issues/_list.rhtml:1:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
app/views/issues/index.rhtml:51:in `_run_rhtml_app47views47issues47index46rhtml'
app/controllers/issues_controller.rb:92:in `index'
app/controllers/issues_controller.rb:91:in `index'
config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'
Rendering /opt/redmine/apps/redmine/public/500.html (500 Internal Server Error)
------------------------------------------------------------------
The interesting point is, that this error appears only on one project. But i can't access any issue in this project over the menue and i don't have a number to try direct access.
Would be great if anybody have a idea how to solve this problem.
Related issues
Updated by Etienne Massip over 13 years ago
Do you have any null value in you lft
or rgt
or root_id
columns of the issues
table?
Updated by Gerald Prock over 13 years ago
Thank you for the fast response and the solution. There was one entry with NULL on all three fields. After deleting that line the project is working again.
Is there any way to prevent that another line like that will be created in future?
Updated by Etienne Massip over 13 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Yes, the basic solution should be to fix #7667.
Anyway, I'd like to know how this NULL value has been inserted; do you use any plugins?
Updated by Gerald Prock over 13 years ago
Thx for the answer and #7667.
On the installation are three plugins installed:- Better_Gantt_Chart in Version 0.5.3
- Redmine_Loader in Version 0.0.11
- MS_Projects in Version 0.1.0
Maybe one user tried to import an XML file. I have to ask them soon (3 people).
The user are able to use the "Redmine_Loader" but not the "MS_Projects".
When i'm able to reproduce the error i will post it.