Exported menu items are not guaranteed to come out in proper order

Created on 24 March 2025, 13 days ago

Problem/Motivation

When exporting some menu items I noticed that sometimes a parent item will be lower down in the list of exported items than it's children. This causes an issue on import.

Steps to reproduce

I'm not entirely sure what causes, but the steps I took are:

  1. Make a menu with multiple levels.
  2. Use drush mdcec to export the menus.
  3. Use drusm mim to import the menus.
  4. Some, but not all items will have incorrect nested levels.

Proposed resolution

We could look into exporting menus in a very specific order.

  1. Export all menu items with no parent
  2. Export all menu items with those root items as a parent
  3. Export all menu items with the previous items as a parent
  4. Repeat until no more items need exporting
🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada nickdjm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024