Duplicate number prefixes affecting sorting

Hi all -

Having a problem where I can’t manually sort pages; no matter what I do the panel won’t allow.

From doing a bit of digging, I can see that this can be down to issues with numbering prefixes in the content folders, which seems to be an issue with my install. Whenever I change an item from unlisted to listed, it gives it a ‘0_’ prefix, as shown below:

Does anyone know why this is?

The parent page is ‘projects’ and the sub pages i’m trying to sort on it are ‘project’.

For the project.yml I’ve made sure I’m defining the sort number:

title: Project

num: '{{ page.sort() }}'

tabs:

And in the projects.yml file I am using the manual sort mode:

sections:
  files:
    type: files
  projects:
    type: pages
    sortBy: manual

Any help appreciated - thanks!

num: '{{ page.sort() }}' means that the sort number should always be the result of page.sort() - by that alone you are disabling manual sorting as you have already defined what the sort number should always be. But as there is no page method sort and probably also no content field called sort this likely returns null which is converted to an integer resulting in 0 always being the sorting number.

For reference: Page blueprint | Kirby CMS

Thanks all - that makes sense. I had added this as it wasn’t working previously, but can see that

‘sortBy: Manual’ doesn’t exist and was hampering the manual sorting. Weirdly I don’t know where I got that from… total brain fail there.

Thanks again!