Closed (works as designed)
Project:
Services
Version:
7.x-3.0-rc3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 May 2011 at 03:05 UTC
Updated:
10 Sep 2014 at 11:30 UTC
Jump to comment: Most recent
Comments
Comment #1
upupax commentedSorry, I forget to say, I'm using a REST Server.
Comment #2
kylebrowning commentedCan you verify this issue exists in 7.x-3.0-rc3?
Tests pass, and Im able to update when I use the Drupal iOS SDK as well.
What parameters are you adding? How are you adding them?
Comment #3
upupax commentedOk, I found I was missing the authorization.
Any example for working with system.connect and session based authorization?
TIA
Comment #4
upupax commentedSorry, it was not a problem of authentication, but of parameters.
In the node update example provided here https://gist.github.com/affc9864487bb1b9c918 the field to update is
node[field_test][0][value]=testtting
while my content needs (or Drupal 7 does?) the language parameter, so it's
node[field_test][it][0][value]=testtting
Now everything works fine.
Comment #5
upupax commentedAgain, the problem persist for multiselect fields.
I tried to update them adding the language parameter, but I get this error:
Warning: Illegal offset type in isset or empty in _form_validate() (linea 1246 di /***/includes/form.inc).
An illegal choice has been detected. Please contact the site administrator.
Comment #6
cedwards.rei commentedHaving the exact same issue.
Notice: Array to string conversion in drupal_map_assoc()
Warning: Illegal offset type in isset or empty in _form_validate()
Error: Illegal choice Array in xxxx element.
In my case this happens with node references. Using the References module.
Comment #7
marcingy commentedThe issue is that you are building the correct structures excepted by fapi you need to submit a form from with drupal and add a dpm at the appropriate place in the code and ensure that the data structure you pass to services meets that critera.
Comment #8
cedwards.rei commentedI managed to get it to work, so I'm not sure if I was doing it incorrectly or if there is a bug.
Before:
After:
Comment #9
marcingy commentedSee comment above
Comment #10
kylebrowning commentedComment #11
roppa_uk commentedI'm getting the same, documentation is extremely poor. I simply need to add a field collection to a node using POST:
{
"field_name": "field_ingredients",
"field_quantity": "1",
"field_ingredient": "egg",
'host_entity': {
'uri': 'http://test/cms/node/47',
'id': '47',
'resource': 'node'
}
}
And I get:
<?xml version="1.0" encoding="utf-8"?>
Missing required argument node