Steps to duplicate
1. disable javascript (ahah behavior doesn't exhibit the problem because it doesn't reload the page).
2. assign a taxonomy(Required, NO tags, NO multiselect) with a couple terms to the poll content type.
3. create a new poll or edit an existing one.
4. set the taxonomy to something.
5. click the "more choices" button.
6. taxonomy select box clears.

Seems to be caused by the page reloading the form.
During the page reload/post the node values return as array values and not the original objects. This is standard in the print preview process as you can see in the taxonomy_preview_terms() function.

You can fake an empty print preview and the problem doesn't show itself.

poll.module:

function poll_more_choices_submit($form, &$form_state) {
  // Set the form to rebuild and run submit handlers.
  node_form_submit_build_node($form, $form_state);
+  $form_state['node_preview'] = '';

I'm not sure what the 'correct' fix would be for this, but this really terrible for sites with large taxonomy trees as this bug shows up in contrib as well, and applies to any module that has this type of 'add more' rows type of functionality.

Comments

jvandervort’s picture

Status: Active » Closed (duplicate)