Reordering fails due to type error

Created on 29 August 2023, 10 months ago
Updated 30 August 2023, 10 months ago

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"

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

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

Comments & Activities

Production build 0.69.0 2024