Closed greeneca closed 12 years ago
hey @greeneca, that's a huge form you've built ! Let me think about a clean solution to handle huge form like yours. thanks
sorry I forgot but I managed to fix it. What I did was to change the session store to use :mongoid_store
and added :
module ActionDispatch
module Session
class MongoidStore < AbstractStore
def destroy_session(env, sid, options)
self.send(:destroy, env)
generate_sid unless options[:drop]
end
end
end
end
to config/initializers/session_store.rb
Just ran into this one myself. Thanks for posting your solution--trying to get it to run as a non-ruby person.
I have a rather large html form that is generating models using the public submission feature. it was working fine in small scale but as soon as I scaled the form and model up to full size I receive a Cookie Overflow error on submit.
ActionDispatch::Cookies::CookieOverflow in Locomotive::Public::ContentEntriesController#create
Following are the Framework Trace and Request parameters:
actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:302:in
[]=' actionpack (3.2.3) lib/action_dispatch/middleware/session/cookie_store.rb:67:in
set_cookie' rack (1.4.1) lib/rack/session/abstract/id.rb:330:incommit_session' rack (1.4.1) lib/rack/session/abstract/id.rb:206:in
context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:incall' actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:338:in
call' dragonfly (0.9.12) lib/dragonfly/cookie_monster.rb:9:incall' actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in
block in call' activesupport (3.2.3) lib/active_support/callbacks.rb:405:in_run__450862839__call__343076895__callbacks' activesupport (3.2.3) lib/active_support/callbacks.rb:405:in
__run_callback' activesupport (3.2.3) lib/active_support/callbacks.rb:385:in_run_call_callbacks' activesupport (3.2.3) lib/active_support/callbacks.rb:81:in
run_callbacks' actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in
call' actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:incall' actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.3) lib/rails/rack/logger.rb:26:in
call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in
call' rack (1.4.1) lib/rack/methodoverride.rb:21:incall' rack (1.4.1) lib/rack/runtime.rb:17:in
call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.1) lib/rack/lock.rb:15:in
call' locomotive_cms (2.0.0.rc7) lib/locomotive/middlewares/fonts.rb:27:incall' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in
call' dragonfly (0.9.12) lib/dragonfly/middleware.rb:13:incall' locomotive_cms (2.0.0.rc7) lib/locomotive/middlewares/cache.rb:20:in
call' railties (3.2.3) lib/rails/engine.rb:479:incall' railties (3.2.3) lib/rails/application.rb:220:in
call' rack (1.4.1) lib/rack/content_length.rb:14:incall' rack (1.4.1) lib/rack/handler/webrick.rb:59:in
service' /home/greeneca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice' /home/greeneca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in
run' /home/greeneca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'Request
Parameters:
{"content"=>{"requested_by"=>"individual", "company"=>"b", "dateofcreation"=>"oubhouboub", "name"=>"oubouboub", "client_ref_no"=>"oubouboub", "telephone"=>"ubouboub", "email"=>"oubouboub", "return_by"=>"Fax", "property_subsearch"=>"YES", "deed_search"=>"YES", "mortgage_search"=>"YES", "document_retrieval"=>"YES", "title_search"=>"YES", "pid_search"=>"YES", "copies_required"=>"YES", "specify_copies"=>"5", "tax_certificate"=>"YES", "historical_deed_search"=>"YES", "litigation_search"=>"YES", "jurisdiction_sheriff_certificate"=>"YES", "jsc_specify"=>"phjpij", "bankruptcy_search_or"=>"YES", "bankruptcy_search_court"=>"YES", "enterprise_name_search"=>"YES", "corporate_document_retrieval"=>"YES", "certificate_of_good_standing"=>"YES", "environmental_search"=>"YES", "sec427_bas"=>"YES", "mvros"=>"YES", "mvros_vin"=>"YES", "mvros_name"=>"YES", "dds"=>"YES", "dds_specify"=>"ghiubouboub", "document_reg"=>"YES", "custom_fields_recipe"=>{"name"=>"Entry4fa957ecb0d86d28fe00258a", "rules"=>[{"name"=>"requested_by", "type"=>"select", "required"=>true, "localized"=>false, "select_options"=>[{"_id"=>BSON::ObjectId('4fa95b4bb0d86d28fe0026af'), "name"=>{"en"=>"individual"}}, {"_id"=>BSON::ObjectId('4fa95b4bb0d86d28fe0026b0'), "name"=>{"en"=>"company"}}]}, {"name"=>"company", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"dateofcreation", "type"=>"string", "required"=>true, "localized"=>false}, {"name"=>"name", "type"=>"string", "required"=>true, "localized"=>false}, {"name"=>"client_ref_no", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"telephone", "type"=>"string", "required"=>true, "localized"=>false}, {"name"=>"fax", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"email", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"return_by", "type"=>"select", "required"=>false, "localized"=>false, "select_options"=>[{"_id"=>BSON::ObjectId('4fa9622eb0d86d28fe00280b'), "name"=>{"en"=>"Fax"}}, {"_id"=>BSON::ObjectId('4fa9622eb0d86d28fe00280c'), "name"=>{"en"=>"Email"}}, {"_id"=>BSON::ObjectId('4fa9622eb0d86d28fe00280d'), "name"=>{"en"=>"Courier"}}, {"_id"=>BSON::ObjectId('4fa9622eb0d86d28fe00280e'), "name"=>{"en"=>"Mail"}}]}, {"name"=>"property_subsearch", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"deed_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"mortgage_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"document_retrieval", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"title_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"pid_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"copies_required", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"specify_copies", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"tax_certificate", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"historical_deed_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"litigation_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"jurisdiction_sheriff_certificate", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"jsc_specify", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"jurisdiction", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"j_specify", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"bankruptcy_search_or", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"bankruptcy_search_court", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"serial_number_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"individual_name_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"enterprise_name_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"corporate_profile_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"corporate_document_retrieval", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"certificate_of_good_standing", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"environmental_search", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"sec427_bas", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"mvros", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"mvros_vin", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"mvros_name", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"dds", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"dds_specify", "type"=>"string", "required"=>false, "localized"=>false}, {"name"=>"document_reg", "type"=>"string", "required"=>false, "localized"=>false}], "version"=>30}}, "conten"=>{"fax"=>"oubouboub"}, "submit"=>"Submit", "slug"=>"request"}