Download & Extend

Override processing at admin/content/taxonomy to trigger lineage_update_all()

Project:Taxonomy Lineage
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

Perhaps with lineage_form_taxonomy_overview_terms_alter().

#2

Status:active» needs review

Here'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 to lineage_update_all() so we can act only on the affected rows.

Tested and seems to work fine on my sandbox.

AttachmentSize
lineage_6_1-613372-2.patch 1.73 KB

#3

Title:"Reset to alphabetical" should trigger lineage_update_all()» Override processing at admin/content/taxonomy to trigger lineage_update_all()

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

AttachmentSize
lineage_6_1-613372-3.patch 5.67 KB

#4

Status:needs review» fixed

Committed

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here