Defect #39200
closedException when opening gantt
0%
Description
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.
Back
I, [2023-10-18T13:48:03.504443 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Started GET "/redmine/issues/gantt" for 192.168.19.6 at 2023-10-18 13:48:03 +0800 I, [2023-10-18T13:48:03.505632 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Processing by GanttsController#show as HTML I, [2023-10-18T13:48:03.513234 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Current user: molin (id=1) I, [2023-10-18T13:48:03.550725 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Rendered gantts/show.html.erb within layouts/base (Duration: 27.8ms | Allocations: 14886) I, [2023-10-18T13:48:03.550992 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Rendered layout layouts/base.html.erb (Duration: 28.1ms | Allocations: 14923) I, [2023-10-18T13:48:03.551395 #8460] INFO -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] Completed 500 Internal Server Error in 46ms (ActiveRecord: 12.9ms | Allocations: 19856) F, [2023-10-18T13:48:03.552704 #8460] FATAL -- : [b82595d7-5eae-4157-aeb7-9ad84413a88c] [b82595d7-5eae-4157-aeb7-9ad84413a88c] ActionView::Template::Error (undefined method `-@' for Sun, 01 Oct 2023:Date): [b82595d7-5eae-4157-aeb7-9ad84413a88c] 132: [b82595d7-5eae-4157-aeb7-9ad84413a88c] 133: # Width of the entire chart [b82595d7-5eae-4157-aeb7-9ad84413a88c] 134: g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i [b82595d7-5eae-4157-aeb7-9ad84413a88c] 135: @gantt.render(:top => headers_height + 8, [b82595d7-5eae-4157-aeb7-9ad84413a88c] 136: :zoom => zoom, [b82595d7-5eae-4157-aeb7-9ad84413a88c] 137: :g_width => g_width, [b82595d7-5eae-4157-aeb7-9ad84413a88c] 138: :subject_width => subject_width) [b82595d7-5eae-4157-aeb7-9ad84413a88c] [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:639:in `coordinates' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:370:in `line' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:310:in `line_for_project' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:274:in `render_object_row' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:232:in `render_project' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:221:in `block in render' [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/models/project.rb:961:in `block in project_tree' [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/models/project.rb:956:in `each' [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/models/project.rb:956:in `project_tree' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/helpers/gantt.rb:219:in `render' [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/views/gantts/show.html.erb:135 [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/controllers/gantts_controller.rb:43:in `block (2 levels) in show' [b82595d7-5eae-4157-aeb7-9ad84413a88c] app/controllers/gantts_controller.rb:42:in `show' [b82595d7-5eae-4157-aeb7-9ad84413a88c] lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Files
Updated by Go MAEDA over 1 year ago
- Subject changed from 打开项目的 甘特图 直接报错 to Exception when opening gantt
Updated by Holger Just over 1 year ago
- Status changed from New to Needs feedback
Based on the code in Redmine 5.0.0, this error should not be possible in the location indicated in your stack trace, i.e. in source:tags/5.0.0/lib/redmine/helpers/gantt.rb#L639. The error could only occur there if you (or someone else) has edited the file and had removed the space before self.date_from
so that the line would read e.g.
coords[:start] = start_date -self.date_from
Please make sure that the lib/redmine/helpers/gantt.rb
file (and with that any file in lib
, app
, public
and all subdirectories of config
and db
are unchanged from their original identity in the Redmine release you are using.
Updated by Go MAEDA over 1 year ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid