Problem description:
TL;DR:
When editing and saving an existing taxonomy term (e.g. simply the name), the corresponding menu item weight is wrongly set to the taxonomy term weight until cache is cleared.
Example:
Before save:
- taxonomy term has a weight of "0"
- its menu item has a weight of -49 in them menu (because menu handles different weights and has additional menu entires)
=> Everything is ordered correctly
After save but BEFORE manual cache clear, e.g. via drush cr
- taxonomy term has a weight of "0"
- its menu item has a weight of 0 in them menu (because menu handles different weights and has additional menu entires)
=> Menu item appears at wrong position
After save AND cache clear:
Everything is allright again:
- taxonomy term has a weight of "0"
- its menu item has a weight of -49 in them menu (because menu handles different weights and has additional menu entires)
=> Everything is ordered correctly again!
So in this intermediate state something is wrong and I guess there may be several issues out there describing this problem...
Any ideas how that happens, are perhaps required cache tags not cleared by taxonomy_menu on taxonomy term save?
Issue fork taxonomy_menu-3118891
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
AnybodyComment #3
AnybodyComment #4
DamienMcKennaLet's add test coverage to make sure this works as expected too.