Action Controller: Exception Caught

Added by Tom Hudak about 9 years ago

I'm getting a strange error on a few of the issues from various projects and I'm having some trouble pinning down the root cause.

This is a db that was migrated from v.6.3 -> v.6.4 -> v.7.3 using the documented rake commands for updating/migrating the db.

Aside from these few issues all other features are working great and the vast majority of issues have 0 problems whatsoever.

For example, when I browse to http://example.redmine.hostname/issues/show/7 I receive the following error, and below the error the an application trace log:

NoMethodError in Issues#show

Showing issues/_history.rhtml where line #5 raised:

undefined method `name' for nil:NilClass

Extracted source (around line #5):

2: <div id="change-<%= journal.id >" class="journal">
3: <h4><div style="float:right;"><
= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" ></div>
4: <
= content_tag('a', '', :name => "note-#{journal.indice}")%>
5: <%= format_time(journal.created_on) > - <= journal.user.name ></h4>
6: <ul>
7: <
for detail in journal.details >
8: <li><
= show_detail(detail) %></li>

Trace of template inclusion: /issues/show.rhtml

RAILS_ROOT: /var/www/redmine-0.7

I've attached a txt file with the full txt of the trace for you to see, as well as the "Request" and "Response" sections of the above error page..

Any help would be much appreciated.

This install is using the latest Ruby/Rails/Gem updates on a CentOS 5.1 installation. Redmine v .7.3

Thanks!

redmine-trace.txt Magnifier (6.78 KB)

Replies (4)

RE: Action Controller: Exception Caught - Added by Tom Hudak about 9 years ago

Follow-up:

This is happening on 11 issues out of about 1500, so it's affecting a very very small subset of our total issues count. Also the age of most of these issues is over 100 days, and in about 8 of the 11, they are over 200 days old.

Thanks.

RE: Action Controller: Exception Caught - Added by Eric Davis about 9 years ago

From the looks of it, there is a missing user on some journal entries.

journal.user.name

Eric

RE: Action Controller: Exception Caught - Added by Tom Hudak about 9 years ago

Well.. Sometimes all it takes is another set of eyes. I'm not sure how I missed that but I did.

Thanks Eric, I've cleaned up the offending Journal entries and all is well.

RE: Action Controller: Exception Caught - Added by Eric Davis about 9 years ago

Well.. Sometimes all it takes is another set of eyes. I'm not sure how I missed that but I did.

Thanks Eric, I've cleaned up the offending Journal entries and all is well.

Not a problem, 3 years of reading Ruby on Rails stack traces makes it second nature to me.

Eric

(1-4/4)