so here is the issue:
get a a vocabulary where terms can have only one parent
create a term with a non root parent
now go to edit this term and press save
on the submit the parent field will revert back to root (though this is not saved just shown)
the problem happens in taxonomy.admin.inc within taxonomy_form_term_submit():
$current_parent_count = count($form_state['values']['parent']);
$previous_parent_count = count($form['#term']['parent']);
// Root doesn't count if it's the only parent.
if ($current_parent_count == 1 && isset($form_state['values']['parent'][0])) {
$current_parent_count = 0;
$form_state['values']['parent'] = array();
}
what does this do when $form_state['values']['parent'] equals to '3' ?
yes....
fortunately the term save happens before this so this aint saved. however can freak out ppl / tests who see this and on subsequent submit functions it could cause some interesting results as well.
Comments
Comment #1
nagba commentedi didnt want to replicate all the is_array() checks that happens in taxonomy_term_save, so opinions are welcome.
Comment #2
montesq commentedHi nagba,
I can't reproduce the issue on D7 HEAD.
Do you reproduce on your side? And if yes give the detailed steps to reproduce from scratch?
Thanks in advance.
Comment #3
nagba commentedi'll check again bit later.
Comment #4
mgiffordNo longer applies.