mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
387 stars 195 forks source link

[ERROR] draft_info_request_batches#update_bodies (NoMethodError) "undefined method `draft_info_request_batches' for nil:NilClass #4734

Open garethrees opened 6 years ago

garethrees commented 6 years ago
A NoMethodError occurred in draft_info_request_batches#update_bodies:

undefined method `draft_info_request_batches' for nil:NilClass
app/controllers/alaveteli_pro/draft_info_request_batches_controller.rb:22:in `update_bodies'

-------------------------------
Request:
-------------------------------

* URL : https://www.whatdotheyknow.com/alaveteli_pro/draft_info_request_batches/update_bodies
* HTTP Method: PUT
* IP address : REDACTED
* Parameters : {"utf8"=>"✓", "_method"=>"put", "authenticity_token"=>"REDACTED", "authority_query"=>"lincoln", "page"=>"1", "mode"=>"search", "category_tag"=>"", "alaveteli_pro_draft_info_request_batch"=>{"draft_id"=>"", "public_body_id"=>"246", "action"=>"add"}, "controller"=>"alaveteli_pro/draft_info_request_batches", "action"=>"update_bodies"}
* Timestamp : 2018-07-17 17:55:32 +0100

-------------------------------
Session:
-------------------------------

* session id: [FILTERED]
* data: {"session_id"=>"REDACTED",
"locale"=>"en",
"remember_me"=>false,
"_csrf_token"=>"REDACTED"}

-------------------------------
Backtrace:
-------------------------------

app/controllers/alaveteli_pro/draft_info_request_batches_controller.rb:22:in `update_bodies'
app/controllers/application_controller.rb:115:in `record_memory'
lib/strip_empty_sessions.rb:13:in `call'
garethrees commented 5 years ago

Had another two of these today.

A NoMethodError occurred in draft_info_request_batches#update_bodies:

undefined method `draft_info_request_batches' for nil:NilClass
app/controllers/alaveteli_pro/draft_info_request_batches_controller.rb:22:in `update_bodies'

-------------------------------
Request:
-------------------------------

* URL : https://www.whatdotheyknow.com/alaveteli_pro/draft_info_request_batches/update_bodies
* HTTP Method: PUT
* Parameters : {"utf8"=>"✓", "_method"=>"put", "authenticity_token"=>"REDACTED", "authority_query"=>"Attorney", "page"=>"1", "mode"=>"search", "category_tag"=>"", "alaveteli_pro_draft_info_request_batch"=>{"draft_id"=>"", "public_body_id"=>"7906", "action"=>"add"}, "controller"=>"alaveteli_pro/draft_info_request_batches", "action"=>"update_bodies"}
* Timestamp : 2019-05-15 08:26:49 +0100
* Rails root : /data/vhost/www.whatdotheyknow.com/alaveteli-2019-05-07T08-58-21

-------------------------------
Session:
-------------------------------

* session id: [FILTERED]
* data: {"session_id"=>"REDACTED",
"locale"=>"en",
"remember_me"=>false,
"_csrf_token"=>"REDACTED"}
garethrees commented 3 years ago

Another:

A NoMethodError occurred in draft_info_request_batches#update_bodies:

undefined method `draft_info_request_batches' for nil:NilClass
app/controllers/alaveteli_pro/draft_info_request_batches_controller.rb:22:in `update_bodies'

-------------------------------
Request:
-------------------------------

* URL : https://www.whatdotheyknow.com/alaveteli_pro/draft_info_request_batches/update_bodies
* HTTP Method: PUT
* Parameters : {"utf8"=>"✓", "_method"=>"put", "authenticity_token"=>"REDACTED", "authority_query"=>"trust", "page"=>"5", "mode"=>"search", "category_tag"=>"", "alaveteli_pro_draft_info_request_batch"=>{"draft_id"=>"1986", "public_body_id"=>"2291", "action"=>"add"}, "controller"=>"alaveteli_pro/draft_info_request_batches", "action"=>"update_bodies"}
* Timestamp : 2021-06-23 09:58:38 +0100

-------------------------------
Session:
-------------------------------

* session id: [FILTERED]
* data: {"session_id"=>"REDACTED",
"locale"=>"en",
"_csrf_token"=>"REDACTED",
"remember_me"=>false}

-------------------------------
Backtrace:
-------------------------------

app/controllers/alaveteli_pro/draft_info_request_batches_controller.rb:22:in `update_bodies'
app/controllers/application_controller.rb:113:in `record_memory'
lib/strip_empty_sessions.rb:15:in `call'
garethrees commented 2 years ago

Might be issue with being logged out but still on the page like #5219?