Download & Extend

Cannot create new single-hierarchy terms

Project:Drupal core
Component:taxonomy.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
addtermfix.patch611 bytesIgnored: Check issue status.NoneNone

#2

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.

#3

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

Thanks!

#4

Status:needs review» reviewed & tested by the community

+1, looks good.

#5

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...

#6

Status:fixed» closed (fixed)
nobody click here