Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm creating nodes using services through XMLRPC. All works fine, but I cannot modify the data (field_date) that the node must use. The structure I'm using correct, however when I see the new node I obtain:
[field_date] => Array
(
[0] => Array
(
[value] =>
[value2] =>
[timezone] => Europe/Madrid
[timezone_db] => UTC
[date_type] => datetime
)
)
Although I'm passing the date in the creation, instead of
[field_date] => Array
(
[0] => Array
(
[value] => 2011-05-20 10:49:17
[value2] => 2011-05-20 11:49:20
[timezone] => Europe/Madrid
[timezone_db] => UTC
[date_type] => datetime
)
)
That is the structure I receive when I look the node with .get once I add a date with node/edit.
Any clue?.
Thanks!
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedSuport requests can not be major.
Comment #2
marcingy CreditAttribution: marcingy commentedYou need to look at what drupal excute excepts and specifically what structure the date field is excepting. The format depends on the widget and lots of strange things happen in date module. Sorry I can't help anymore other than suggesting submit a form in drupal itself add a dpm and see what the data structure should look like.
Comment #3
un11imig CreditAttribution: un11imig commentedFinally I find the error is not a services issue, but a date issue.
I close the issue.
Comment #4
gianfrasoft CreditAttribution: gianfrasoft commentedun11imig, please explain...!
Comment #5
un11imig CreditAttribution: un11imig commentedHi gianfrasoft
I add the next code on date module (date_elements.inc,v 1.46.2.2.2.70 2010/12/29 14:11:50):
In our case we are working with the POPUP witched.
Regards,
Comment #6
hubobbb CreditAttribution: hubobbb as a volunteer commenteddrupal7 Services Module 3.17
REST SERVER, Using with Pop-up Calendar widget and Date fields
server side :set field Pop-up calendar ,work well .
client ajax :
"node[field_mytime][und][0][value][date]="+"2017\-01\-01"+"&node[field_mytime][und][0][value][time]="+"11\:45"
+"&node[field_mytime][und][0][value2][date]="+"2018\-01\-01"+"&node[field_mytime][und][0][value2][time]="+"12\:45";