Menu order does not persist if you add a 2nd View.
Workaround seems unlikely to be discovered by most users.
Steps provided by @harings_rob for reproducing the issue (#2468713: Internal/custom menu links force-reset to the top of their menus on cache rebuild) still apply if you add multiple Views.
Steps:
Have a menu with some item.
Add a view, add it to the menu.
Add a 2nd view; add it to the menu.
Edit the menu and drag it to another place.
Flush cache
Views menu item resets position.Show as expanded also resets*
*Show as expanded did not appear to be an issue.
A few other details seem worth noting:
- when exporting the configuration for the second View, no 'weight' attribute appears under the Menu section (no mention of weight at all)
- if you deliberately set a weight within the View UI, it sticks even after cache is cleared
- if you deliberately set a weight within the Menu UI, it does not stick beyond first save of the menu changes
Comments
Comment #2
kay_v CreditAttribution: kay_v as a volunteer commentedComment #3
rootworkThis probably needs to be 8.1 at least. That should get it more attention too.
Comment #4
dawehnerI totally agree we should fix this quickly, given that this is sort of a data loss.
Comment #5
dawehnerDoes #2598488: Views Page display menu expanded option is not included and gets destroyed by cache-rebuild solve the problem for you?
Comment #6
dawehnerComment #7
dawehnerOr that: #2464077: Menu link overrides are lost after cache rebuild
Comment #8
tobiberlinHad the same problem with an older version of Drupal 8.1.x - patch from https://www.drupal.org/node/2464077 solved the problem but as this patched was already applied to core an update to Drupal 8.1.5 solved this problem for me.
Comment #9
dawehnerGiven how old this issue is, I guess we can close it now.