Defect #22048
closedException throws during plugin rendering
0%
Description
The following code in redmine\app\views\layouts\base.html.erb
at 28th line will throw ActionController::UrlGenerationError
when plugin has controller with namespace in routing.
<%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
A part from route.rb
of plugin:
RedmineApp::Application.routes.draw do #... get 'projects/:project_id/reports/admin' #... end
This is not the only source of this error, because of :controller
parameter is used in relative form, so any usage of ActionController::Base#url_for
would throw an error (e.g. during menu generation).
The only way for a while to bypass the error is to avoid namespaces in plugins.
To produce an error you need to generate a plugin with controller using namespaces, like Reports::BadPluginController < ApplicationController
, which action renders as redmine part (using standard redmine layout), and route to it get 'projects/:project_id/reports/bad_plugin'
.
Met at
Environment: Redmine version 3.2.0.stable Ruby version 2.1.5-p273 (2014-11-13) [i386-mingw32] Rails version 4.2.5.1 Environment development Database adapter Mysql2 SCM: Subversion 1.8.5 Filesystem
Related issues