Sort menu list by menu title

Created on 26 July 2019, over 5 years ago
Updated 24 July 2023, over 1 year ago

Problem/Motivation

The admin menu list (/admin/structure/menu) appears to sort alphabetically by menu title until the list exceeds one page. When the number of menus exceeds 50, the list is paginated and menus are then sorted 1) by machine name across all menus, then 2) alphabetically by menu title per listing page. If menu titles are changed such that they no longer align with the machine name, they can be difficult to find across a multipage list.

Steps to Reproduce

  1. Create/generate more than 50 menus (e.g. with devel)
  2. Change an early menu title on page 1 such that it should sort to the end of the entire menu list

You'll find that it only moves to the bottom of page 1, not to the end of the last page

Proposed resolution

Implement/override getEntityIds() in MenuListBuilder.php to explicitly sort the list query by menu title ('label').

Remaining tasks

Write a patch
Tests
Review
Commit

User interface changes

Menu list will be sorted alphabetically by menu title across the entire menu list.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

Feature request
Status

Fixed

Version

11.0 🔥

Component
Menu UI 

Last updated about 1 month ago

No maintainer
Created by

🇺🇸United States justcaldwell Austin, Texas

Live updates comments and jobs are added and updated live.
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