0

I am trying to Create Services to Create Node Type Discussion in a Group using Services Module, but getting the error :

500 Internal Server Error : An error occurred(0): Unknown data property field_group_privacy

In the Header I have given:

Content-type:application/json

x-csrf-token:token value

session-name:session name value

In the Body I have given :

{
"og_group_ref": {"und": [{"target_id": "3897"}]},

"title": "Title of discussion",

"field_description": {"und": [{"value": "test description"}]},

"type": "discussion"

}

Can anyone please tell me why I am getting this error ?

ScreenShot

Smajl
  • 7,555
  • 29
  • 108
  • 179
Malik
  • 45
  • 1
  • 1
  • 7

1 Answers1

0

The service you are posting the data to has an error in it's code. It's probably trying to do something with a field called "group privacy" that doesn't exist. Or the query to look at that data is invalid

Leigh
  • 672
  • 1
  • 6
  • 7
  • The field group privacy don't exist here : > admin/structure/types/manage/discussion/fields But there is field with this name here : > /admin/structure/types/manage/group/fields So its the problem at server side, I am POSTing the data correctly ? – Malik Oct 07 '15 at 08:38
  • An alternative could be the server is expecting you to send a "field_group_privacy" data field which is missing in your posted data. The server should really be able to handle missing data rather than failing and creating a 500 – Leigh Oct 07 '15 at 09:06
  • I tried to give this in body but still the same error : "field_group_privacy":{"und":[{"value": "0"}]}, – Malik Oct 07 '15 at 09:14