When adding new terms to a vocabulary with single hierarchy (it was originally created with hierarchy disabled, but I don't know if that matters), new terms do not appear. For whatever reason, terms with a record in the term_hierarchy table will appear, but new terms being created don't have a term_hierarchy record for them.

I suspect that the taxonomy_get_tree function that joins against term_hierarchy table as an inner join is what excludes the new terms. If I manually create a record in term_hierarchy with parent=0, they appear.

CommentFileSizeAuthor
#1 addtermfix.patch611 bytesccourtne
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ccourtne’s picture

Status: Active » Needs review
FileSize
611 bytes

This is an issue with the new form api changes to taxonomy module. The old form always created an array by appending '][' to the form parent name and taxonomy_save_term always exepected an array in $edit['parent']. I have attached a patch which corrects taxonomy_save_term to accept $edit['parent'] as a single value.

asimmonds’s picture

Patch still applies and I have tested as many basic taxonomy combinations that I can think of and this fixes all single parent term additions.
So +1 from me.

javanaut’s picture

+1 I just tested the patch, too and it is working for me.

Thanks!

Robin Monks’s picture

Status: Needs review » Reviewed & tested by the community

+1, looks good.

asimmonds’s picture

Status: Reviewed & tested by the community » Fixed

This patch was applied when the admin help update was committed.
http://cvs.drupal.org/viewcvs/drupal/drupal/modules/taxonomy.module?r1=1...

Anonymous’s picture

Status: Fixed » Closed (fixed)