スクリプトを作成してノードにデータを入力しようとしています...次のコードを使用しています
$node->field_tags['und'][0]['textfield'] = 'first_tag';
$node->field_tags['und'][0]['textarea'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
whatsits は何の役にも立たず、その用語はタグという名前の語彙に追加されていません...次のコードを書くと、既存の用語呼び出し xml が選択されます..tid=1; が原因だと思います。
$node->field_tags['und'][0]['textfield'] = 'first_tag';
$node->field_tags['und'][0]['textarea'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
私も次のコードを試しました
$node->field_tags['und'][0]['name'] = 'first_tag';
$node->field_tags['und'][0]['description'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
既存の語彙に用語を追加する方法を教えてください。