Wrong menu weight after changing parent

Created on 1 September 2025, about 1 month ago

Problem/Motivation

When changing the parent menu item from the node form, the weights are not updated when the menu item gets a new parent.

Steps to reproduce

- Create two top-level menu items
- Create N items under the two top-level items through a Menu Link field
- Edit a content that has a menu item at the 2nd level
- (enable the displaying of row weights to see the issue)
- Take a note of the current weight of the menu link
- Change the parent of the node's menu item to be the other top-level menu item you created
- See that the "Current link" or "(provided menu link)" is now moved to the top
- See that the weight is not reflecting its new position
- Save the content and re-edit it
- The item should be at the top of the list but is now more or less in its original weight value position

Proposed resolution

Make the menu item weight value reset (back to -50) to reflect the changes shown in the Menu Link Weight table.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇮Finland iSampo

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

Comments & Activities

Production build 0.71.5 2024