Issue with array numbers in content folder

Hey, I just finished a website and gave it to my client.
Now I don’t know how they did it, but some of the pages can’t be moved anymore.
I looked up in the content folder and some pages have the same array number.
e.g.
4_page_3
4_page_4
Now I tried to fix that but that will take ages. Furthermore, I’m a little anxious that this will happen all the time. When I gave it to my client, all array numbers (1–20) were correct. Is it because he copies the pages? Because I don’t know how to mess this up else.

I have to say that all pages are made on the front page in the panel. This is how I set up the site.yml

title: Site
preset: pages
unlisted: true
templates:
  - default

the default.yml is nothing special as well.

title: Default Page
preset: page
fields:
typ:
label: Typ
type: select
options:

text:
label: Text
type: textarea
size: large

It’s super simple.
Does someone have a similar issue?

You mean by duplicating them in the Panel, not directly in the file system, right?

Do you use any hooks, plugins?

Yes, in the panel.
There are no hooks.
It’s a really simple kirby setup.

Hm, I don’t know. I’ve seen this happen for image sorting numbers with approx. 100 images in a page and a very slow server.

Are you using the latest Kirby version (3.3.4)?

When you download the project to your local environment and try sorting the pages, does that do anything? Are there any errors in console when the client tries to sort pages in the Panel on their server?

What exactly happens? The numbers are not changed at all anymore? They all get the same sorting number?

With the current set of pages my client created, I can’t sort the pages that have the same sorting number. As I said, I don’t know how that happened.

I recreated it locally and on their server, but there were no issues. No sorting number was twice. That what makes me wonder in the first place. I created and copied pages.

Edit: I had Kirby 3.2.3 installed. Maybe thats why?

First thing I’d do is update to the current version.

I just tested in a Starterkit, prepending the same number to all subfolders of the photography page. After drag&drop in Panel, they were all renumbered correctly again.

How many pages are there on the main level? Do pages have subpages?

I’m just gonna fix this manually now, update Kirby and hope that this will fix it.

Thank you :stuck_out_tongue:

It’s just strange that you can’t fix it by dragging pages around instead of doing it manually. Maybe update first then just drag&drop and. see what happens.

Yes, it told me “The page directory cannot be moved”. I’ve also changes the slugs, but that didn’t help.

But normal editing etc. is possible? So it’s not a permission problem?

Looks like some people had this issue before with older versions. If it ever happens again after the update to Kirby 3.3.4, please report again here or create an issue on GitHub.

Yep, after updating Kirby I can drag and drop everything, even if the sorting number exists multiple times. It renames each directory correct.

Ok, great.

Hey, wanted to share this here rather than opening a new issue. I’ve recently started having this issue on my remote server, locally everything is fine.

I’ve looked for a duplicate folder but no luck. The issue is also only in a specific directory too.
The folder permissions seem to be correct so I’m stumped.

code: 400
details: []
exception: "Kirby\Exception\LogicException"
file: "/kirby/src/Cms/PageActions.php"
key: "error.logic"
line: 59
message: "The page directory cannot be moved"
route: "pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)/status"
status: "error"

I do have plugins installed but nothing that should mess this up. Also, I disabled them and I still have the issue. Any ideas @texnixe?

Hey Tim,

first the typical questions:

  • Which Kirby release are you using, the latest?
  • What is your remote server environment (in what way is it different from your local setup)

From the route I take it that this error pops up from you try to change the status of a page. Anything particular about this, like only when you change from draft to public or from public to draft?

Is there anything particular about this folder where it happens as compared to other folders, e.g. a lot more subpages?

So I’m using the latest Kirby version.

My remote server is virtually the same. I could be using a slightly different PHP version.

It shows up when I try to change the status of the page from any status or delete a page.

The folder has over 200 subpages and I’m unable to reorder the pages by dragging. This is confusing because I’m using default numbering (1_interview-title, 2_interview-title) and so on.

Although I get this error, the page status does actually change.

Does this error only show up in the browser console or do you actually get an error popup?

I get the pop up, it looks like this.

Tim, are you 100% sure that you don’t have any duplicate sorting numbers on the remote server?

If that is definitely ok, then maybe look into your PHP execution time and memory settings and increase if necessary.

1 Like

So I went through my content folder a few time and no luck. I couldn’t spot a duplicate. I also upped the execution time and memory limit but again, nothing. I still get the error.

Have you tried to clear the browser cache, delete the media folder, the cache (if used) and the sessions folder (just to make sure there are no side effects of whatever sort).

And does everything else work, like updating and creating pages?