Closed (fixed)
Project:
amfserver
Version:
7.x-3.03
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Reporter:
Created:
8 May 2012 at 11:49 UTC
Updated:
7 Nov 2012 at 22:15 UTC
Hi,
Maybe our syntax is wrong, but the module doesn't save fields of nodes having CCK fields, for example, CCK named "field_test". The content type was named "test":
AS3 code: (works fine with Drupal6 module, but not with Drupal7 module)
sequence.add(new CallbackTask(_proxy.setRemoteCallId, "node.create"));
var node:Object = DrupalUtils.createNode("test", "test title", "test body");
node.field_test = new Array({value: "my test val"});
sequence.add(new DrupalInvokeTask(_proxy, "node", "create", node));
The node is created, but the CCK is empty.
What is the syntax for saving a CCK field in a node? is it a bug?
It doesn't work for us..
Thanks,
Guy.
Comments
Comment #1
rolf vreijdenberger commentedHi Guy,
I'd try asking on the IRC channel for services on D7. It might be that field values are handled differently by services itself (different naming convention maybe), havent' checked it yet. Did you check with an http sniffer that the values are actually sent?
Comment #2
rolf vreijdenberger commentedI think you need to save custom fields in an array format see http://timonweb.com/how-programmatically-create-nodes-comments-and-taxon...
edit: ah, I see you did that already, maybe the language part?? (see link above)
Comment #3
guyzalon commentedHi Rolf,
The values are being sent according to "Charles".
Its not only the CCK fields that are not being saved, its also the "Body" field of the node that is not being saved.
We need a solution urgently, is there a workaround? maybe using the REST services instead of AMF for saving nodes?
Thanks,
Guy.
Comment #4
guyzalon commentedIt works!
Thanks for the link!
AMFServer & Services work perfectly! it's not a bug.
The format is indeed more complicated in Drupal7 (3 nested Arrays!) - Language code is included.
Owe you few beers ;)
Thanks,
Guy.
Comment #5
kpedini commentedGuy,
Do you happen to have the syntax you used for saving a custom field in a node? I followed the link provided but I'm having trouble reverse engineering it in AS3. I too am having an issue saving to Body or custom fields.
Thanks,
Kevin