Hey all,
So my situation is such. I have and event content type on both a desktop drupal install and a mobile drupal install. Node creations are propagated from one install to the other through services (IE www.example.com/end-point/node).
The problem is my event content type has a date field and whenever I create a node in one install, all the fields show up fine on the other install except for the date which turns out null (which is strange because this field is marked as required).
Strangely, node updates through services have to go through a custom module of mine that somewhat replicates the functionality of services' native node update functionality. When I update a date through this custom module the date shows up fine.
For context, my custom module updates the node through node_save() and the date values that are saved are from the date module and look like this "2012-06-26T00:00:00"
What I'm wondering is why services' native node create functionality sets this date to null.
Comments
Comment #1
kylebrowning commentedComment #2
ygerasimov commented@captainpants no, services do not set any fields to null intentionally. Are you sure you use 6.x-2.2 version of services as it is no more supported.
For 6.x-3.x services do form submit of the node form. So you need to pass your arguments how form submit handler expects them to be. So I would recommend to debug how form receives arguments during form submit via interface and pass the same set of arguments via services.
Please feel free to reopen this issue if you have any further questions.
Comment #3
captainpants commentedTurns out that it's exactly as you put it. I had to format the date in a way that the form expected it considering that services uses drupal_execute to create nodes.
Fixed