In the vocabulary edit page the node types checkboxes are marked as required, so every vocabularies should have at least one node type. When you create a new vocabulary, you get the error message "Types field is required." if you don't select any node type. The problem comes when you edit the vocabulary: if you deselect all node types and press Submit, the vocabulary will be saved without node types. If you edit it again and submit it without node types, you'll get the error message.
In other words, if the vocabulary has node types it's possibile to save it without the node types; if the vocabulary hasn't any node type, it's not possibile to save it again without the node types.
In my opinion the node types shouldn't be a required field, you might need vocabularies for admin purposes without showing them in the node edit form.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | taxonomy_node_types_not_required.patch.txt | 722 bytes | AmrMostafa |
| #2 | taxonomy_form_vocab_validate.patch | 728 bytes | asimmonds |
Comments
Comment #1
magico commentedStill present.
Comment #2
asimmonds commentedCould adding a taxonomy form _validate to check for a empty node types array be a suitable fix?
Comment #3
AmrMostafa commented+1 for that node types shouldn't be required.
Simply because you can't control that. If you have a vocabulary with type 'foo' selected. User deleted node type 'foo' from admin -> content -> content types, now your vocabulary is nodetype-less.
Comment #4
AmrMostafa commentedPatch attached, it removes the #required bit from $form.
Comment #5
Jaza commentedI am all for making the 'types' field non-required. It is already non-required in the category module. But my guess is that others may feel it is encouraging hackish use of the taxonomy system (I may be wrong, and I hope I'm wrong, in guessing this):
+1 from me, FWIW.
Comment #6
kkaefer commentedContinue here: http://drupal.org/node/100429