How to resolve the error when posting a new node with Image Field and Entity Reference? I'm trying to create a new node using Drupal 7 + Services 3. The node type is 'activity_photo' has an image field, and a reference to a node. This is what I'm posting to the service
{
 &quot;type&quot;:&quot;activity_photo&quot;,
 &quot;field_node_reference&quot;:{
 &quot;und&quot;:[{
 &quot;target_id&quot;:&quot;x (1273)&quot;
 }]
 },
 &quot;field_photo&quot;:{
 &quot;und&quot;:[{
 &quot;fid&quot;:&quot;20077&quot;
 }]
 }
}

The response is status 200:
{&quot;nid&quot;:null,&quot;uri&quot;:...}

My error log shows the following:

Notice: Undefined index: display_field in file_field_widget_value()
Warning: end() [function.end]: Passed variable is not an array or object in file_managed_file_validate()
Notice: Undefined index: nid in _node_resource_create()

Any help on how to proceed?
In the end I changed the entity reference field to select list and posted like this:

{
 "title":"test",
 "type":"activity_photo",
 "language":"und",
 "field_node_reference":{
 "und":[1273]
 },
 "field_photo":{"und":[{"fid":"8880"}]}
}


also, I found my own modules was implementing hook_form_alter for this form, and this had further complications to be addressed to get it to work. So any hook_form_alter is something to remember when looking for similar problems.