Project

General

Profile

Actions

Defect #12826

closed

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

Added by Michael F almost 12 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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'


Related issues

Related to Redmine - Patch #38139: Add guard clause to time_tag method to handle nil timeClosedGo MAEDA

Actions
Actions #1

Updated by Etienne Massip almost 12 years ago

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

Actions #2

Updated by Michael F almost 12 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.

Actions #3

Updated by Go MAEDA almost 2 years ago

  • Related to Patch #38139: Add guard clause to time_tag method to handle nil time added
Actions #4

Updated by Go MAEDA almost 2 years ago

  • Status changed from New to Closed

Michael F wrote:

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

I have opened #38139 to properly handle nil and avoid Internal Server Error.

Actions

Also available in: Atom PDF