プロジェクト

全般

プロフィール

Vote #65479

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
News_6
対象バージョン:
開始日:
2009/07/15
期日:
進捗率:

0%

予定工数:
category_id:
6
version_id:
11
issue_org_id:
3615
author_id:
4855
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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:     
43:

<%= authoring comment.created_on, comment.author %>

44: <%= textilizable(comment.comments) %> 45: <% end if @comments.any? %> 46:
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 ....

journals

I've attached a patch for it.

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Fixed in r2820.
Thanks for pointing this out.
--------------------------------------------------------------------------------
Merged in 0.8-stable in r2881.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリNews_6 にセット
  • 対象バージョン0.8.5_11 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0