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.
Currently, if one uses the "Reset to alphabetical" option at admin/content/taxonomy/#
, the lineages are not updated and therefore end up being entirely wrong. This action needs to trigger lineage_update_all()
.
I'm not quite sure how to go about fixing this bug, as "Reset to alphabetical" doesn't trigger hook_taxonomy()
.
Comment | File | Size | Author |
---|---|---|---|
#3 | lineage_6_1-613372-3.patch | 5.67 KB | xjm |
#2 | lineage_6_1-613372-2.patch | 1.73 KB | xjm |
Comments
Comment #1
xjmPerhaps with
lineage_form_taxonomy_overview_terms_alter()
.Comment #2
xjmHere's a patch to override the form action following the "Reset to alphabetical" confirmation so that we can run
lineage_update_all()
after the vocabulary weights have been set. I also added an optional vid tolineage_update_all()
so we can act only on the affected rows.Tested and seems to work fine on my sandbox.
Comment #3
xjmHere's a better patch. The original was fewer lines, but interrupted the normal flow of form processing, whereas this one simply overrides the whole submit handler. It will be easier to maintain and also allows lineage_update_all to be called just once after the reordering form has been processed (to ensure the correct lineages for all terms).
Applied and tested; works fine.
Comment #4
Agileware CreditAttribution: Agileware commentedCommitted