Defect #8690
openUser can't be displayed
0%
Description
Hello,
I tried to open the user page:
Processing UsersController#show (for 53.141.162.91 at 2011-06-27 13:25:44) [GET] Parameters: {"action"=>"show", "id"=>"4", "controller"=>"users"}
And gets following error:
NoMethodError (undefined method `<=>' for nil:NilClass): lib/redmine/activity/fetcher.rb:80:in `events' lib/redmine/activity/fetcher.rb:80:in `sort!' lib/redmine/activity/fetcher.rb:80:in `events' app/controllers/users_controller.rb:74:in `show' /usr/lib/ruby/1.8/rack/head.rb:9:in `call' /usr/lib/ruby/1.8/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `synchronize' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:96:in `process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:479:in `safe_fork' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:180:in `start' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:82: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:213:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:132:in `spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99
Related issues
Updated by C. X. over 13 years ago
Opening a ticket fails with following error:
ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #12 of app/views/issues/show.rhtml: 9: <%= render_issue_subject_with_tree(@issue) %> 10: </div> 11: <p class="author"> 12: <%= authoring @issue.created_on, @issue.author %>. 13: <% if @issue.created_on != @issue.updated_on %> 14: <%= l(:label_updated_time, time_tag(@issue.updated_on)) %>. 15: <% end %> app/helpers/application_helper.rb:319:in `time_tag' app/helpers/application_helper.rb:315:in `authoring' app/views/issues/show.rhtml:12:in `_run_rhtml_app47views47issues47show46rhtml' app/controllers/issues_controller.rb:121:in `show' app/controllers/issues_controller.rb:120:in `show' /usr/lib/ruby/1.8/rack/head.rb:9:in `call' /usr/lib/ruby/1.8/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `synchronize' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:96:in `process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:479:in `safe_fork' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:180:in `start' /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:82: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:213:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:132:in `spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99 Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)
It seems, that something goes wrong with the trac importer.
I created another project to test the functionality and there all works.
Updated by J. R. over 12 years ago
Any news? At least a work around would be nice...
Updated by J. R. over 12 years ago
The problem is that trac import failed to handle mysql dates so all dates in the database are '0000-00-00 00:00:00'. Redmine treats such date as nil so an error occurs while sorting (sorting patch was not enough).
So I had to replace all 0 dates to some valid date (i.e. 1970 00:00:00).
Updated by Etienne Massip over 12 years ago
- Target version set to Candidate for next minor release
- Affected version (unused) changed from devel to 1.4.0
- Affected version set to 1.4.0
Updated by J. R. over 12 years ago
Trac 0.12 use unix time with microseconds. Here's a fix to migrate_from_trac.rake:
class ::Time class << self alias :real_at :at alias :real_now :now # Fixing import for trac 0.12 def at(time) d = nil if time > 10000000000 then d = real_at(time / 1000000, time % 1000000) else d = real_at(time) end d end def now real_now - @fake_diff.to_i end def fake(time) # Adding nil argument handling time = 0 if time.nil? @fake_diff = real_now - time res = yield @fake_diff = 0 res end end end
Please include it in the latest trunk. Thanks.
Updated by Daniel Felix almost 12 years ago
- Status changed from New to Needs feedback
Any news on this? Is this still reproduceable on the current supported redmine versions?
Updated by C. X. almost 12 years ago
Daniel Felix wrote:
Any news on this? Is this still reproduceable on the current supported redmine versions?
Hey,
Sorry I can't answer. I haven't tried it again for a long time.
Updated by Jan Niggemann (redmine.org team member) over 11 years ago
- Target version deleted (
Candidate for next minor release)
Updated by Craig Rodrigues over 11 years ago
Can you try this patch:
http://www.redmine.org/issues/14567
Updated by Toshi MARUYAMA over 11 years ago
- Related to Patch #14567: migrate_from_trac.rake does not convert timestamps in Trac database version 23 added