Exception "NoMethodError in Projects#activity" when clicking on the "Activity" tab
Added by Stéphane Elias almost 15 years ago
Hello,
I get the following exception when clicking on the "Activity" tab:
NoMethodError in Projects#activity Showing app/views/projects/activity.rhtml where line #9 raised: undefined method `is_closed?' for nil:NilClass Extracted source (around line #9): 6: <h3><%= format_activity_day(day) %></h3> 7: <dl> 8: <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> 9: <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> 10: <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> 11: <span class="time"><%= format_time(e.event_datetime, false) %></span> 12: <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> RAILS_ROOT: C:/dev/redmine-0.9.3 Application Trace | Framework Trace | Full Trace C:/dev/redmine-0.9.3/app/models/issue.rb:263:in `closed?' C:/dev/redmine-0.9.3/app/models/issue.rb:44 C:/dev/redmine-0.9.3/app/views/projects/activity.rhtml:9:in `_run_rhtml_app47views47projects47activity46rhtml' C:/dev/redmine-0.9.3/app/views/projects/activity.rhtml:8:in `each' C:/dev/redmine-0.9.3/app/views/projects/activity.rhtml:8:in `_run_rhtml_app47views47projects47activity46rhtml' C:/dev/redmine-0.9.3/app/views/projects/activity.rhtml:5:in `each' C:/dev/redmine-0.9.3/app/views/projects/activity.rhtml:5:in `_run_rhtml_app47views47projects47activity46rhtml'
Running Redmine 0.9.3 on Windows XP SP3 through Webrick, using a mysql 5.1 database. Not using Cygwin. I think. Just downloaded the Windows packages from http://rubyonrails.org/.
script/about:
About your application's environment Ruby version 1.8.7 (i386-mingw32) RubyGems version 1.3.6 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root C:/dev/redmine-0.9.3 Environment production Database adapter mysql Database schema version 20100221100219
This is a fresh install of a test project, and I started from a blank database (did not load the default data, silly me), in which I loaded existing data using Redmine itself, a few SQL queries, and even queries executed from MS Access through ODBC links. I admit that this may not be the best situation to be in and request for help, but the data seems fine, I can browse through issues, view a roadmap, and generally everything apart from this "Activity" thing seems to work.
Judging from the exception, I initially thought the problem was with the data, and specifically with the status of some issues, but all the records in the 'issues' table have a valid 'status_id' value, which maps to an existing status in 'issue_statuses'.
I am well aware that the problem may be on my side, but I am a bit puzzled as to what to do next, and I would greatly appreciate any clue/hint/help.
Thanks in advance