0

I have a node with field_order_status field(not required) in list(text) type and radio button widget and I want to update a node(nid:95) but my sample JSON PUT content(application/json) throws Status 406 Error:

{"form_errors":{"field_order_status][und":"An illegal choice has been detected. Please contact the site administrator."}}

my content is:

{
  "field_order_status":{
    "und":[
      {
        "value": "1"
      }
    ]
  }
}

sample url:

http://localhost/caesarschickencms/createorder/node/95

Services 3.4, Drupal 7.22

Notes: When I tried replacing und with other values like 'en', it accepts but not updates, refer to drupal 7 + services 3 - inserting nodes with select fields

And Devel page vars dump: enter image description here

What would be missing?

2

What Services version do you use?

Since Services 7.3.4 we deen to set Cookie & X-CSRF Token on header for every (PUT/POST) execution

Please check this comment too https://drupal.org/comment/6491362#comment-6491362

0

I don't think it's an issue with X-CSRF Token because the error send by server will be different.

But Drupal expect a value like "payment_to_valid", "order_shipping", "checkout_login" or "Pending".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.