プロジェクト

全般

プロフィール

Vote #70218

未完了

User can't be displayed

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Needs feedback
優先度:
通常
担当者:
-
カテゴリ:
Importers_15
対象バージョン:
-
開始日:
2011/06/27
期日:
進捗率:

0%

予定工数:
category_id:
15
version_id:
0
issue_org_id:
8690
author_id:
33780
assigned_to_id:
0
comments:
11
status_id:
10
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
40
ステータス-->[Needs feedback]

説明

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

journals

Opening a ticket fails with following error:

<pre>
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)
</pre>

It seems, that something goes wrong with the trac importer.
I created another project to test the functionality and there all works.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Any news? At least a work around would be nice...
--------------------------------------------------------------------------------
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).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Trac 0.12 use unix time with microseconds. Here's a fix to migrate_from_trac.rake:

<pre>
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
</pre>

Please include it in the latest trunk. Thanks.
--------------------------------------------------------------------------------
Any news on this? Is this still reproduceable on the current supported redmine versions?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Can you try this patch:
http://www.redmine.org/issues/14567
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Reopened,6868,migrate_from_trac and trac 0.12
relates,New,14567,migrate_from_trac.rake does not convert timestamps in Trac database version 23

Admin Redmine さんが約2年前に更新

  • カテゴリImporters_15 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0