mysociety / alaveteli

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

[ERROR] classifications#create (ActionController::ParameterMissing) "param is missing or the value is empty: classification" #5747

Open garethrees opened 4 years ago

garethrees commented 4 years ago

An ActionController::ParameterMissing occurred in classifications#create:

param is missing or the value is empty: classification
app/controllers/concerns/classifiable.rb:50:in `classification_params'

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

* URL : https://www.whatdotheyknow.com/projects/1/classifications?url_title=REDACTED
* HTTP Method: POST
* IP address : REDACTED
* Parameters : {"utf8"=>"✓", "authenticity_token"=>"REDACTED", "last_info_request_event_id"=>"7044875", "commit"=>"Submit status", "url_title"=>"REDACTED", "controller"=>"projects/classifications", "action"=>"create", "project_id"=>"1"}
* Timestamp : 2020-06-08 10:23:03 +0100
* Rails root : /REDACTED/alaveteli-2020-06-03T12-09-12

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

* session id: [FILTERED]
* data: {"session_id"=>"REDACTED",
"locale"=>"en",
"user_id"=>204711,
"user_circumstance"=>"normal",
"post_redirect_token"=>"REDACTED",
"ttl"=>"2020-06-08T10:22:48.616+01:00",
"_csrf_token"=>"REDACTED",
"projects"=>
{"1"=>
{"classifiable"=>{"current"=>"663353", "skipped"=>["662928", "662930"]}}}}

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

app/controllers/concerns/classifiable.rb:50:in `classification_params'
app/controllers/concerns/classifiable.rb:65:in `message_required_for_state?'
app/controllers/application_controller.rb:111:in `record_memory'
lib/strip_empty_sessions.rb:13:in `call'
gbp commented 4 years ago

This happens when no described state radio button has been selected before submitting the form.

garethrees commented 2 years ago

Had another of these:

An ActionController::ParameterMissing occurred in classifications#create:

 param is missing or the value is empty: classification
Did you mean?  last_info_request_event_id
              commit
              authenticity_token
              action
 app/controllers/concerns/classifiable.rb:50:in `classification_params'

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

 * URL        : https://www.whatdotheyknow.com/projects/5/classifications?url_title=enforcement_of_standards_in_priv_94
 * HTTP Method: POST
 * Parameters : {"utf8"=>"✓", "authenticity_token"=>"REDACTED", "last_info_request_event_id"=>"11437137", "commit"=>"Submit status", "url_title"=>"enforcement_of_standards_in_priv_94", "controller"=>"projects/classifications", "action"=>"create", "project_id"=>"5"}
 * Timestamp  : 2022-04-12 22:09:05 +0100
   * Rails root : /data/vhost/www.whatdotheyknow.com/alaveteli-2022-04-07T14-32-40

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

 * session id: [FILTERED]
 * data: {"session_id"=>"REDACTED",
  "locale"=>"en",
  "_csrf_token"=>"REDACTED",
  "remember_me"=>true,
  "user_id"=>172456,
  "user_login_token"=>"REDACTED",
  "post_redirect_token"=>"REDACTED",
  "projects"=>
   {"5"=>
     {"classifiable"=>{"current"=>"836322", "skipped"=>[]},
      "extractable"=>{"current"=>"836314", "skipped"=>[]}}}}

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

 app/controllers/concerns/classifiable.rb:50:in `classification_params'
 app/controllers/concerns/classifiable.rb:65:in `message_required_for_state?'
 app/controllers/application_controller.rb:111:in `record_memory'
 lib/deeply_nested_params.rb:15:in `call'
 lib/strip_empty_sessions.rb:14:in `call'