[regression] Menu links reparenting via interface could lead to unusable broken menus

Created on 6 July 2016, about 8 years ago
Updated 21 February 2023, over 1 year ago

Problem/Motivation

Menu links reparenting via interface could lead to unusable broken menus.

This could lead to major issues with some users, specially since when you try to fix the menu using the interface, it tends to scramble even more, leading (depending on the depths you're using) to unusable menus, only fixed by editing the database directly.

Steps to reproduce

  1. Create a new menu on the interface (/admin/structure/menu/manage/) with a structure like this:
    • Link 1
      • Link 1.1
      • Link 1.2
    • Link 2
    • Link 3
  2. Save and then reorder the menu to this sequence:
    • Link 1.2
      • Link 1
      • Link 1.1
    • Link 2
    • Link 3
  3. Save

What is expected:

The menu should be saved correctly with the new order.

What happens instead:

The menu order gets scrambled to something like this:

  • Link 1
  • Link 1.2
    • Link 1.1
  • Link 2
  • Link 3

Proposed resolution

TBD

Remaining tasks

Reroll #33
Fix issue / get tests passing
Reviews

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Menu systemΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡·Brazil ivan.lewas

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024