_taxonomy_term_select has been changed to use form_select instead of form_item:

return form_select($title, $name .'][', $value, $options, $description, $multiple ? 'size="'. min(12, count($options)) .'"' : 0, $multiple);

This breaks when $multiple is TRUE, as form_select will add "[]" to $name again!

CommentFileSizeAuthor
taxonomy-multiple.patch517 byteswiz-1
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven’s picture

Perhaps it's better and cleaner to fix this by checking the type of vocabulary when validating the terms. In fact there is a bug there at the moment where you could still assign multiple terms in a signle select vocabulary by sending out customized POST data.

drumm’s picture

I don't think it is actually broken. I just submitted a new node with two terms selected from each of two vocabularies. And it worked.

wiz-1’s picture

Hmm... I agree that it seems to work (tried it right now), but the generated HTML is not clean:

<select name="edit[taxonomy][][]" multiple="multiple"  size="8" id="edit-taxonomy]["><option value="1">...

Note the "edit[taxonomy][][]", which should read "edit[taxonomy][]". I don't clearly remember in what situation it didn't work for me, but it happened. The patch fixes this situation. The id is not pretty either, but that's another story.

wiz-1’s picture

Version: » 4.6.0

Somebody fixed this in 4.6.0, thanks

Anonymous’s picture