I've long had a problem with module and I'm surprised if I'm the first to do anything about it. I like what you've done with the including the parents on the form but it needs to be taken just a bit further.
There needs to be another option which says 'auto select ancestors'.
I have written the code for this, it's very simple indeed.
- in the installation, change the weight of the module to the weight of the taxonomy module -1
db_query("UPDATE {system} SET weight = (SELECT weight FROM system WHERE name = 'taxonomy') -1");
- in nodeapi insert and update call a new function, passing the node.
- here is the new function:

function taxonomy_select_ancestors(&$taxonomy) {
  $parents = array();
  foreach ($taxonomy as $vid => $tids) {
    foreach ($tids as $tid) {
      $parents += taxonomy_get_parents_all($tid);
  foreach ($parents as $term) {
    $taxonomy[$term->vid][$term->tid] = $term->tid;

I'll put this in the module if you want to give me git permission. Otherwise can you let me know if you will put it in, or not.

#1 taxonomy_select_ancestors.tar_.gz644 bytesmatslats


matslats’s picture

new644 bytes

Ok Here it is as a standalone module, tested. There's an error in the install line above.
It's arguably too tiny to release as its own module...

jcisio’s picture

This could be done at the client side with a few lines of jQuery so that we can document it if someone want to use.

matslats’s picture

if it's done on the client side, then it would depend on the parent being included in the form. My fix above is working well. Please let me know, should I make it a dependent module, or will you integrate it or something like it?

jcisio’s picture

The parent is always included in DOM structure, that's why I suggested the customization on the client side. I won't integrate this feature, as it does something this module is not supposed to do: automatically select a parent item.