http://drupal.org/node/140157
For free tagging this works assuming free tagging is enabled for the first vocabulary
$node_type = 'story'; $vocs = taxonomy_get_vocabularies( $node_type); $voc = array_shift( $vocs); $edit = node_factory_create_node( $node_type); // assuming free tagging is enabled for first vocabulary $edit['taxonomy']['tags'][$voc->vid]= 'a,b,c'; $nid = node_factory_save_node($edit);
See also the tests directory
This works too
$edit['taxonomy'][] = 9;
So the documentation must be updated accordingly.
Automatically closed -- issue fixed for two weeks with no activity.
Comments
Comment #1
clemens.tolboomComment #2
clemens.tolboomFor free tagging this works assuming free tagging is enabled for the first vocabulary
See also the tests directory
Comment #3
clemens.tolboomThis works too
So the documentation must be updated accordingly.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.