Grav 1.7 add weird number to folder numeric prefix

@pmoreno

I have just download the latest version of grav and installed it, added gantry and hydrogen and followed your pattern of adding pages to a clean site.

I also got the same result, the 9999999, so I then created another fresh install and followed the pattern on a clean site , and the fauly occurs.

So we can eliminate that is anything to do with your site, it is a “issue” with grav and it is replicatable. I will log it on github and someone will need to check why the issue is happening.

In the mean time, a quick fix is when you are creating your new page and allow it create the 999999.foldername , go in to your filemanager and change it to 01.foldername

anything further pages in the parent will be numbered from the previous page (ie. change 999999 or 100000 to 01 and the sort order will be correct)

If you create another sub page the first folder will be labeled incorrectly, so you would have to rename it back to 01 and then any subsequent pages in that folder will be correct again.

It think this is due to two issues,

  1. if you create a new page / folder from the root of the pages admn panel, everything works (parent = root). If then try and create a sub page or folder, you allowed to select the parent, but it still says root, rather than the sub folder.

  2. if you create a page which has the long prefix and create a subpage under that folder, if it is the first child in that directory, everytime you hit save of the a new page, the folder number is incremented.

So \root\01.newfolder\100000.subfolder changes number, everytime you hit the save button when in the edit, so it changes 100000,100001,100002 etc.

But if you then create another child in that directory it will number from the existing foldername