Defect #12826

Error viewing some issues: ActionView::Template::Error (undefined method `-' for nil:NilClass):

Added by Michael F over 9 years ago. Updated over 9 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:2.2.1

Description

I have found error on version 1.0.1 from Debian-Stable. Then i upgraded to the last version 2.2.1. Same error still showing on same issues.
Some issues are normal diaplayed, some with this error. After editing and saving of issues with error there are no changes: same error.
Copying issue with error to the new issue are ok, new issue are opened ok too.
Error message from production.log version 2.2.1:

Started GET "/redmine/issues/63" for 195.190.93.14 at Sat Jan 12 21:11:20 +0100 2013
Processing by IssuesController#show as HTML
Parameters: {"id"=>"63"}
Current user: bear (id=3)
Rendered issues/_action_menu.html.erb (14.5ms)
Rendered issue_relations/_form.html.erb (5.6ms)
Rendered issues/_relations.html.erb (9.9ms)
Rendered issues/_history.html.erb (6.8ms)
Rendered issues/show.html.erb within layouts/base (107.2ms)
Completed 500 Internal Server Error in 490ms

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:371:in `time_tag'
app/helpers/application_helper.rb:367:in `authoring'
app/views/issues/_history.html.erb:7:in `_app_views_issues__history_html_erb__5042996_70054040142960'
app/views/issues/_history.html.erb:2:in `each'
app/views/issues/_history.html.erb:2:in `_app_views_issues__history_html_erb__5042996_70054040142960'
app/views/issues/show.html.erb:124:in `_app_views_issues_show_html_erb__506392088_70054038935660'
app/controllers/issues_controller.rb:119:in `show'
app/controllers/issues_controller.rb:116:in `show'

History

#1 Updated by Etienne Massip over 9 years ago

Looks a lot like #12026-3, did you migrate from Trac too?

#2 Updated by Michael F over 9 years ago

Yes, i have migrated from Trac too. Manually set (SQL) all fielfs with date (created_on and updated_on) from '0000-00-00 00:00:00' to a valid value solved problem :)
UPDATE `wiki_contents` set `updated_on`='2010-12-31 23:59:59' where `updated_on`='0000-00-00 00:00:00'

Thanks!

But i think, that for null as date or wrong date must be showed correct error message.

Also available in: Atom PDF