Error on moving pages, same positions assigned

I really can’t figure this one out.

Every time I try to change the position of a page, an error in the panel appears.

Screenshot 2024-08-23 at 16.00.44

Starting with this structure without position duplicates:

Screenshot 2024-08-23 at 15.58.14

Ending up with a duplicate because the element I moved take over the poisiton of the page where I move it too without the other page folder being renamed.

Screenshot 2024-08-23 at 16.05.30

That it must have something to do with position duplicates I got from The page directory cannot be moved - Error.

But still after cleaning up that folder, the error still appears and creates duplicates of position. I have no idea how I can debug this to find out what causes this.

Does anybody have a good approach?

Kirby Version: 4.3.0
PHP Version: 8.2.x

Not sure I understand what you mean by “moving a page”. Using the “move page” feature from the dropdown or just “changing position”?

How many pages are there in that folder?

Sorry, that was truly confusing from my side. Changing position. So, moving them in order from one position to another on the same hierarchy level.

There are exactly 22 pages (children) excluding the drafts.

Edited the original post for clarity, that I mean changing position and not moving it somewhere else.

Thanks for clarifying. Have you checked if you can reproduce this issue in a fresh Starterkit?

How heavy in terms of included “inventory” are these pages, like, do they contain lots of images?

Does this happen locally or on a remote server?

I had a similar issue; it was driven by manually amending pages. The way I corrected it was - to remove pages 20 and 22 and then create them again. For some reason, I got caught in a loop of getting Kirby to duplicate page numbers. That may not be the reason for your issue, but it may resolve it.

Hi @renestalder, I was wondering if you were able to resolve your issue. I think I am facing something similar.

I get the “Page directory cannot be moved” error when trying to manually reorder the pages in the panel and also when changing the status of pages.

Position duplicates are created by the system. Interestingly, sometimes the system will also randomly delete the img contents and field contents (plus the field names themselves) from a page folder when trying to reorder too.

The problem began on a live server, so I I removed all plugins, upped the execution time and memory limit and cleared the browser cache, deleted the media folder, the cache and the sessions folder too. This did not solve the issue though. I downloaded content folder and the problem persists locally too. I tested with a fresh plainkit too.

Before running all these tests, I also made sure there were no duplicate position numbers in the folder names.

Currently running the latest Kirby version. Thanks anybody who may have an insight!