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?

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anybody created an issue. See original summary.

Anybody’s picture

Issue summary: View changes
Anybody’s picture

DamienMcKenna’s picture

Issue tags: +Needs tests

Let's add test coverage to make sure this works as expected too.

Raghavendra A M made their first commit to this issue’s fork.