Project

General

Profile

Actions

Feature #12898

closed

Handle GET /issues/context_menu parameters nicely to prevent returning error 500 to crawlers

Added by Björn Peemöller almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

When I navigate to the URL /issues/context_menu in my browser, I get an error 500.

The airbrake notification I get points to line 36 in file app/views/context_menus/issues.html.erb:

ERROR MESSAGE:

NoMethodError: undefined method `include?' for nil:NilClass

WHERE:

context_menus#issues

[PROJECT_ROOT]/app/views/context_menus/issues.html.erb:36

[PROJECT_ROOT]/app/controllers/context_menus_controller.rb:71

URL:
http://<my-domain>/redmine/issues/context_menu

BACKTRACE:
[PROJECT_ROOT]/app/views/context_menus/issues.html.erb:36

[GEM_ROOT]/gems/actionpack-3.2.11/lib/action_view/template.rb:145

[GEM_ROOT]/gems/actionpack-3.2.11/lib/action_view/template.rb:145

...

I do not know in which circumstances this URL is used, but as this error is reproducible by retrieving the URL directly, it might be worth a fix.

My configuration:

Environment:
  Redmine version                          2.2.1.stable
  Ruby version                             1.8.7 (i486-linux)
  Rails version                            3.2.11
  Environment                              production
  Database adapter                         PostgreSQL
Redmine plugins:
  redmine_wiki_extensions                  0.6.0

Actions

Also available in: Atom PDF