Hello. Our team is developing a web site.
During the implementation, we are facing on problem related to creating a node with node reference field.
The below is a part of json results when we request a node information using a REST service module.
"field_places":{"und":[{"nid":"8"},{"nid":"9"}]}
However, when we create a new node using a json query, the notation is not working.
For example, if "field_places":{"und":[{"nid":"12"},{"nid":"14"}]} uses again
-----------------------------------------
form_errors:
field_places][und][0][nid: 'Place Nodes: found no valid post with that title.'
field_places][und][1][nid: 'Place Nodes: found no valid post with that title.'
-----------------------------------------
are returned.
Anybody who know how to make a json query for creating a node with node reference field
Comments
Comment #1
gsgphg commentedComment #2
mac_weber commentedTry changing the nid value to "[nid:xxxx]"
It may be related to http://drupal.org/node/1353662
I posted a tutorial of how I solved it:
http://drupal.org/node/1354202 - Services 3 - POST node.create with custom fields
Comment #3
gsgphg commentedThank you a lot !!!
I would be a good reference :)
Comment #4
yched commentedI guess the question has been answered. Thks @Mac_Weber
Comment #5.0
(not verified) commentedmodified unclear body