This project is archived and is in readonly mode.

#6756 new
Dallas Pool

deep rack error when submitting a form with 2 like named select elements, one specified as multi.

Reported by Dallas Pool | April 29th, 2011 @ 07:21 PM

<% form_for @object, :url => test_url do |f| %>
<%= f.select :status, status_options %>
<%= f.select :status, multi_status_options, :multiple => true %>
<% end %>

Submit the above form and the following error was observed on rack 1.1, Rails 2.3.10.

/!\ FAILSAFE /!\ 04/29/2011 Status: 500 Internal Server Error expected Array (got String) for param `status'

/Users/codeninja/Sites/sfm/lib/patches/rack.rb:37:in `normalize_params'
/Users/codeninja/Sites/sfm/lib/patches/rack.rb:51:in `normalize_params'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/utils.rb:64:in `parse_nested_query'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/utils.rb:62:in `each'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/utils.rb:62:in `parse_nested_query'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/request.rb:264:in `parse_query'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/request.rb:153:in `POST'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/methodoverride.rb:15:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/params_parser.rb:15:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/session/abstract_store.rb:177:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:29:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:9:in `cache'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:28:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/failsafe.rb:26:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/dispatcher.rb:114:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/reloader.rb:34:in `run'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/actionpack-2.3.10/lib/action_controller/dispatcher.rb:108:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rails-2.3.10/lib/rails/rack/static.rb:31:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rails-2.3.10/lib/rails/rack/log_tailer.rb:17:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in `process'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in `run'
/Users/codeninja/.rvm/gems/ruby-1.8.7-p334@sfm/gems/rails-2.3.10/lib/commands/server.rb:111
script/server:3:in `require'
script/server:3

Expected result would be for the last form element value to supersede the previous values.

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Tags

Pages