By scottgifford on
Hello,
I'm having some trouble using some CCK form fields, like the date picker dropdown and checkboxes, working with XML-RPC services. In the simplest example, when I load a node with node.load then save it with node.save, I get a validation error. It seems that node.load returns the data in its native format, but node.save expects it to be formatted like a Web form. If I change the fields to simple text fields, everything works fine, except of course that the Web GUI is crappy.
I reported bugs against CCK and Services, but though I would ask here too in case anybody had ideas. Bugs are here:
Does anybody have any suggestions for making this work?
Thanks!
----Scott.
Comments
Work-around?
Hello Scott,
I'm curious if you ever finished your script to address this issue. If so, would you mind sharing it?
Hi thompcha, I wrote some
Hi thompcha,
I wrote some custom code using the Services module, which simply took a consistent set of fields from the RPC request and converted them to a node for saving, and took a node and converted it to a consistent set of fields for loading. Basically just some Service RPC calls, and some mundane code for mapping fields between the two different data structures.
Hope this helps!
Have some problem
Hello!
I have some problem with checkboxes and xmlrpc via services module. I write some application in C# and can't to send checkbox data to services. Maybe someone know in what format data must be sended?
With Date field I sending like this and all work perfect:
So we have an array:
Thanks to all for any help.
I found solution
Hi! I found solution for problems with cck fields (checkboxes and date time picker) and xml-rpc services node.save function
datetime cck field you need to send in following format:
[field_date] => Array
(
[0] => Array
(
[value] => Array
(
[year] => 2014
[month] => 7
[day] => 7
)
)
)
and CheckBoxes in this format:
[field_b_material] => Array
(
[value] => Array
(
[1991] => 1991
[1985] => 1985
)
)
Where 1991 is ID of taxonomy term.
If someone interested for C# code I can to send it.