Code Snippets

Fix for CCK Content Taxonomy Field with Hard-Coded Vid

Use this hook to alter any of the settings exported by features in hook_content_default_fields() in the mymodule.features.content.inc file. For further explanation, check out this blog post.

/**
 * Implementation of hook_content_default_fields_alter().
 */
function mymodule_content_default_fields_alter(&$fields) {
  if (array_key_exists('my_node_type-field_my_cck_field', $fields)) {
    $vid = //code to get vid...
    $fields['my_node_type-field_my_cck_field']['vid'] = $vid;
  }
}
Resource Tags: