Issue Bug New Orphaned

#108485Moving pages in page tree using BEFORE method inserts page into last visible node instead of sibling

Stefan Hilhorst 12/15/25, 11:47 updated 12/15/25, 11:48

Description

When moving pages in the page tree using the BEFORE positioning method, the page is inserted inside the last visible (expanded) node, instead of being placed before the selected target page as a sibling.

This behavior breaks the expected hierarchy logic of the page tree and can easily lead to pages being moved into the wrong parent without the editor noticing immediately.

—-

Steps to Reproduce

1. Create the following page tree structure:

  • Page 1
  • Page 2
  * Page 3
  • Page 4

2. Ensure that:

  • Page 2 is expanded
  • Page 3 is visible
  • Page 4 is visible

3. Page 1 is currently a sibling of Page 2 and Page 4, positioned before Page 2.

4. Move Page 1 using drag & drop, targeting Page 4.

—-

Expected Result

Page 1 should be placed before Page 4, resulting in:

  • Page 2
  • Page 3
  • Page 1
  • Page 4

(Page 1 remains on the same level as Page 4)

—-

Actual Result

Page 1 is incorrectly moved inside Page 3 (the last visible expanded node), resulting in:

  • Page 2
  • Page 3
* Page 1
  • Page 4

Impact

  • Editors may unintentionally move pages into incorrect parent pages
  • Hard to detect in large or deeply nested page trees
  • Can cause structural and navigation issues

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] Moving pages in page tree using BEFORE method inserts page into last visible node instead of sibling Resolves: #108485 Releases: main