Project

General

Profile

Actions

Defect #3615

closed

500 Internal Server Error is raised if add an empty comment to the news

Added by Andrew Rudenko almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
News
Target version:
Start date:
2009-07-15
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

There is ability to add a comment to the news. And 500 Internal Server Error is rendered if adds an empty comment.
I'm using
  • Redmine 0.8.4.devel.2815
  • PostgreSQL 8.0.15
  • Ruby 1.8.6 (2009-03-31 patchlevel 368) [i486-linux]
  • Rails 2.2.2
ActionView::TemplateError (undefined method `any?' for nil:NilClass) on line #45 of app/views/news/show.rhtml:
42:     </div>
43:     <h4><%= authoring comment.created_on, comment.author %></h4>
44:     <%= textilizable(comment.comments) %>
45: <% end if @comments.any? %>
46: </div>
47:
48: <% if authorize_for 'news', 'add_comment' %>

    app/views/news/show.rhtml:45
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view
....

Files

empty_news_comments_fix.patch (1.94 KB) empty_news_comments_fix.patch Redmine 0.8.4.devel.2815 Chris Grieger, 2009-07-15 22:00
Actions #1

Updated by Chris Grieger almost 15 years ago

I've attached a patch for it.

Actions #2

Updated by Mischa The Evil almost 15 years ago

  • Priority changed from Low to Normal

I can confirm the described behaviour also.

I've corrected the issue-description by wrapping the trace into pre-tags to prevent line-endings to be ignored. I also corrected the issue-priority.

Regards,

Mischa.

Actions #3

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Resolved
  • Target version set to 0.8.5
  • Resolution set to Fixed

Fixed in r2820.
Thanks for pointing this out.

Actions #4

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from Resolved to Closed

Merged in 0.8-stable in r2881.

Actions

Also available in: Atom PDF