--- taxonomy_defaults.module.orig 2012-05-16 15:39:42.183734001 +0100 +++ taxonomy_defaults.module 2012-05-16 15:43:27.311733669 +0100 @@ -67,6 +67,7 @@ function taxonomy_defaults_form_alter(&$form, &$form_state, $form_id) { // Only alter node forms if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + $is_preview = isset($form_state['node_preview']); $node = $form['#node']; // Retreive the core forum vocabulary id so it can be skipped later @@ -91,13 +92,13 @@ } $typed_string = taxonomy_implode_tags($terms, $vid); - if ($visible) { + if ($visible && !$is_preview) { // Do not preselect terms on nodes that already have been edited if (!isset($node->nid)) { $form['taxonomy']['tags'][$vid]['#default_value'] = $typed_string; } } - else { + else if (!$visible) { // For hidden vocabs, we just assign the defaults without checking for existing terms. // It's a bit brutal to assume this is OK, but so is the alternative, and this keeps the forms clean. $form['taxonomy']['tags'][$vid] = array( @@ -107,13 +108,13 @@ } } else { - if ($visible) { + if ($visible && !$is_preview) { // Do not preselect terms on nodes that already have been edited if (!isset($node->nid)) { $form['taxonomy'][$vid]['#default_value'] = $default_tids; } } - else { + else if (!$visible) { // For hidden vocabs, we just assign the defaults without checking for existing terms. // It's a bit brutal to assume this is OK, but so is the alternative, and this keeps the forms clean. $form['taxonomy'][$vid] = array(