Using this module I've found something odd. When I move terms around (change their parents) it usually works fine and the taxonomy menu reflect those changes except on one case:
Steps to reproduce:
1) Create a term (let's call it Term A) that has no parent (top level term). The menu now has a top level entry.
2) Assign a parent (Term B) to that term, that is, make the term the child of Term B.
After step (2) the Term A should appear as a child of the Term B in the menu:
- Term B
-- Term A
but it keeps coming as:
- Term B
- Term A
no matter what I do. Things I've tried that haven't worked:
-Saving Term A or Term B again.
-Moving Term A around, try to make it the child of another term.
-Rebuilding cache.
-Saving the taxonomy menu again (hoping that maybe it would rebuild the entire menu).
The only thing that has worked for me has been deleting the term and creating it again with the right parent. However that is not a solution in my case (I have a lot of content categorized with the offending term).
Is this the expected beahviour of the module or a bug?
Comments
Comment #2
dkre CreditAttribution: dkre commentedI can confirm this with Drupal 8.3.0 ~ Taxonomy Menu 8.3.3
Cache rebuild + cron have no effect
Comment #3
millenc CreditAttribution: millenc commentedI've managed to get it working by setting the option "All menus entries are expanded" and setting the depth to 9 (my taxonomy tree has 5-6 levels at most). With this configuration the module generates a menu with the whole taxonomy tree structure and moving a parent term below another term have the desired effect that the generated menu gets updated (the term appears below it's correct parent).
Maybe it's just the way the module works, if the whole tree is not available in the menu, moving a parent term does not work as it's parent does not really exist.
@dkre,
Try setting the configuration that I mention in this comment to see it that fixes your issue.
Comment #4
jeremyH1024 CreditAttribution: jeremyH1024 commentedDrupal: 8.3.2
Taxonomy Menu: 8.x-3.3
Millenc: Your fix works, but appears to be temporary. I added a new article and the taxonomy went back to the previous broken state.
I changed the settings after it broke and it repaired the issue again.
Comment #5
millenc CreditAttribution: millenc commented@jeremyH1024
That's weird then. Anyhow, my fix was intended to be a workaround rather than a proper solution to the problem. I guess there's certainly a bug involved, so let's keep this issue open and see if someone more knowlegdeable about the module can give a definitive answer.
Comment #6
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedI wasn't able to reproduce this issue. I didn't face any such problem , when i created taxonomy term , added it as parent for other previously built terms , cleared the cache , menu changed accordingly.
Comment #7
Utilvideo CreditAttribution: Utilvideo commentedSame bug.
Comment #8
Utilvideo CreditAttribution: Utilvideo commentedSolve problem.
https://www.drupal.org/node/2762037
But after cache clear, not working:(
Comment #9
Utilvideo CreditAttribution: Utilvideo commentedApplay patch from here
https://www.drupal.org/node/2830188
and drag and drop in menu, not in taxonomy, and it worked.
but if order taxonomy menu, is change menu weight and order (with this patch https://www.drupal.org/node/2762037), but after cache clear back again.
I think that problem in multilanguage sites.
Comment #10
Giovanni Canzio CreditAttribution: Giovanni Canzio commentedSame issue here... any news?
Comment #11
DamienMcKennaI just tested and the changes made to the current 8.x-3.x codebase don't resolve this problem either.
Comment #12
AnybodyI can also confirm #11.
When creating a term on root level first and then moving it into a deeper level > max depth, the menu item is not being deleted.
Comment #13
Vojta CreditAttribution: Vojta commentedI think I have same problem.
Comment #14
Tichris59 CreditAttribution: Tichris59 commentedI have the same problem with drupal 8.6.3 and last stable release of this menu ( 8.x-3.3 ).
When I add a term, delete a term : no cache problem
When I move a term to another parent : cache problem, I need to rebuild router.
I did a workaround in a custom module, it's an easy hook waiting the fix in the module :
Comment #15
batkorI think that implementing a menu deriver is redundant.
Comment #16
pookmish CreditAttribution: pookmish commentedThe suggestion in #14 didn't seem to work for my scenario. I took a more extreme approach that deletes the menu item when updating the term. Then the taxonomy menu module will rebuild that menu link if necessary.
This is a more heavy hammer approach but it seems to resolve the issue
Comment #17
DamienMcKennaLet's add test coverage for this too, to make sure the functionality works as expected.