Problem/Motivation
The reorder method was broken by requiring the wrong type. The parent id of a MenuLinkContent is a string:
TypeError: MenuHelper::reorder(): Argument #1 ($parentId) must be of type ?int, string given
Reordering menu link items might not work when other elements use default weights.
Steps to reproduce
- Set two links under the same parents to weights -50 and -49.
- Use pagetree to reorder the link with weight -49 above the one with -50. The moved link will get a weight of 20, the other link will keep -50, so the links are not reordered.
Proposed resolution
- Adjust MenuHelper::reorder(): Argument #1 ($parentId) to be "string"
Issue fork pagetree-3383943
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Issue fork frontendpublishing-3383943
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pvbergen commentedComment #4
pvbergen commentedComment #6
pvbergen commentedComment #7
pvbergen commented