Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | addtermfix.patch | 611 bytes | ccourtne |
Comments
Comment #1
ccourtne CreditAttribution: ccourtne commentedThis 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.
Comment #2
asimmonds CreditAttribution: asimmonds commentedPatch 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.
Comment #3
javanaut CreditAttribution: javanaut commented+1 I just tested the patch, too and it is working for me.
Thanks!
Comment #4
Robin Monks CreditAttribution: Robin Monks commented+1, looks good.
Comment #5
asimmonds CreditAttribution: asimmonds commentedThis patch was applied when the admin help update was committed.
http://cvs.drupal.org/viewcvs/drupal/drupal/modules/taxonomy.module?r1=1...
Comment #6
(not verified) CreditAttribution: commented