Defect #13232

Link to topic in nonexistent forum causes error 500

Added by Björn Peemöller almost 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Forums
Target version:2.2.4
Resolution:Fixed Affected version:2.2.3

Description

Hi,

I just discovered that GETting an URL which points to a topic of a forum that does not exist causes an error 500. I could reproduce it by the following steps:

  1. Create a new project with forums enabled (optional)
  2. Create a new forum
  3. Create a new topic, remember the GET url
  4. Delete the forum
  5. GET the remembered url

The stack trace says:

ERROR MESSAGE:

NoMethodError: undefined method `messages' for nil:NilClass

WHERE:

messages#show

[PROJECT_ROOT]/app/controllers/messages_controller.rb:127

URL:

https://domain.com/redmine/boards/2/topics/55

BACKTRACE:

[PROJECT_ROOT]/app/controllers/messages_controller.rb:127
[GEM_ROOT]/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:462
[GEM_ROOT]/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405
[GEM_ROOT]/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405
[GEM_ROOT]/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385

I'm running Redmine 2.2.3.stable.

Associated revisions

Revision 11446
Added by Jean-Philippe Lang almost 5 years ago

Fixed that requesting a message from an invalid forum should respond with 404 (#13232).

Revision 11596
Added by Jean-Philippe Lang over 4 years ago

Merged r11446 from trunk (#13232).

History

#1 Updated by Jean-Philippe Lang almost 5 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.2.4
  • Resolution set to Fixed

Fixed in r11446, thanks for pointing this out.

#2 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF