Project

General

Profile

Inconsistent invalid date errors

Added by Christian Biggins over 12 years ago

Hi Guys,

I have redmine 1.2.2 on local dev, staging and production.

I have been working on a few plugins lately and I am getting errors with my plugins and other, more established plugins (schedules) which is doing my head in.

This is the error;

ActionView::TemplateError (invalid date) on line #68 of vendor/plugins/redmine_schedules/app/views/schedules/_calendar.html.erb:
65:             <% schedule_entries_by_day = @entries.group_by {|entry| entry.date} %>
66:             <tr>
67:                 <% (calendar.startdt..calendar.enddt).each do |day| %>
68:                                 <td class="even<%= ' today' if Date.today == day %> <%= ' holiday' if day.holiday?($holiday_locale, :observed) %>">
69:                         <ul>
70:                             <% if !schedule_entries_by_day[day].nil? %>
71:                                 <% schedule_entries_by_day[day].sort.each do |entry| %>

    /usr/lib/ruby/1.8/date.rb:752:in `civil'
    holidays (1.0.3) lib/holidays.rb:212:in `easter'
    holidays (1.0.3) lib/holidays/au.rb:20
    holidays (1.0.3) lib/holidays.rb:356:in `call'
    holidays (1.0.3) lib/holidays.rb:356:in `call_proc'
    holidays (1.0.3) lib/holidays.rb:126:in `between'
    holidays (1.0.3) lib/holidays.rb:118:in `each'
    holidays (1.0.3) lib/holidays.rb:118:in `between'
    holidays (1.0.3) lib/holidays.rb:115:in `each'
    holidays (1.0.3) lib/holidays.rb:115:in `between'
    holidays (1.0.3) lib/holidays.rb:114:in `each'
    holidays (1.0.3) lib/holidays.rb:114:in `between'
    holidays (1.0.3) lib/holidays.rb:66:in `on'
    holidays (1.0.3) lib/holidays.rb:390:in `holidays'
    holidays (1.0.3) lib/holidays.rb:400:in `holiday?'
<snip>

The problem is that this doesn't happen for all users and all projects. It also seems to be slightly environment dependant as, for the life of me, I cannot reproduce this on my local development environment.

Was hoping somebody knew what was causing this and/or how to troubleshoot this effectively. (relatively new to rails, but been building in PHP for 10+ years)

Thanks in advance.


Replies (1)

RE: Inconsistent invalid date errors - Added by Mischa The Evil over 12 years ago

Just an idea: is the required holidays gem available for use?

Edit: please ignore this comment, seems I'm not fully awake yet... :-S

    (1-1/1)