Defect #12026
closed500 error on user page after migrating from Trac to RedMine 2.0.3
0%
Description
When we click on a username (https://redmine/users/id), we get the 500 error.
Environment:
Redmine version 2.0.3.stable.9901
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.6
Database adapter MySQL 5.1.63
Redmine plugins:
redmine_ldap_sync 1.2.0
redmine_scm 0.4.1
Message log :
Started GET "/users/105" for at Fri Oct 05 11:14:49 +0200 2012
Processing by UsersController#show as HTML
Parameters: {"id"=>"105"}
Rendered users/show.html.erb within layouts/base (14.2ms)
Completed 500 Internal Server Error in 32ms
ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
34:
35: <div class="splitcontentright">
36:
37: <% unless @events_by_day.empty? >
38: <h3><= link_to l(:label_activity), :controller => 'activities',
39: :action => 'index', :id => nil, :user_id => user user,
40: :from => @events_by_day.keys.first %></h3>
app/views/users/show.html.erb:37:in `_app_views_users_show_html_erb__1794637145_69869802302240'
app/controllers/users_controller.rb:77:in `show'
app/controllers/users_controller.rb:76:in `show'
Thanks for your help !
Related issues
Updated by Jean-Philippe Lang about 12 years ago
- Priority changed from High to Normal
Please try without plugins.
Updated by Anonymous about 12 years ago
Same error without plugins :
Started GET "/users/75" for at Mon Oct 08 08:36:53 +0200 2012
Processing by UsersController#show as HTML
Parameters: {"id"=>"75"}
Rendered users/show.html.erb within layouts/base (122.7ms)
Completed 500 Internal Server Error in 136ms
ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
34:
35: <div class="splitcontentright">
36:
37: <% unless @events_by_day.empty? >
38: <h3><= link_to l(:label_activity), :controller => 'activities',
39: :action => 'index', :id => nil, :user_id => user user,
40: :from => @events_by_day.keys.first %></h3>
app/views/users/show.html.erb:37:in `_app_views_users_show_html_erb__1794637145_70212067734340'
app/controllers/users_controller.rb:77:in `show'
app/controllers/users_controller.rb:76:in `show'
Thank you.
Updated by Anonymous about 12 years ago
Hello, I've also got an error on several issues imported from trac :
ActionView::Template::Error (undefined method `-' for nil:NilClass):
4: <div id="note-<%= journal.indice >">
5: <h4><= link_to "##{journal.indice}", {:anchor => "note-#{journal.indice}"}, :class => "journal-link" >
6: <= avatar(journal.user, :size => "24") >
7: <= authoring journal.created_on, journal.user, :label => :label_updated_time_by ></h4>
8:
9: < if journal.details.any? %>
10: <ul class="details">
app/helpers/application_helper.rb:358:in `time_tag'
app/helpers/application_helper.rb:354:in `authoring'
app/views/issues/_history.html.erb:7:in `_app_views_issues__history_html_erb__2027461019_69932141960580'
app/views/issues/_history.html.erb:2:in `each'
app/views/issues/_history.html.erb:2:in `_app_views_issues__history_html_erb__2027461019_69932141960580'
app/views/issues/show.html.erb:122:in `_app_views_issues_show_html_erb__346350888_69932140648000'
app/controllers/issues_controller.rb:117:in `show'
Thanks for your help
Updated by Anonymous about 12 years ago
- Status changed from New to Resolved
Ok, i found the error :
the journal table in redmine database has wrong created_on field
set it to an arbitrary date, it now works
Updated by Toshi MARUYAMA about 12 years ago
- Status changed from Resolved to Closed
Updated by Go MAEDA almost 2 years ago
- Related to Patch #38139: Add guard clause to time_tag method to handle nil time added