If you define a value for automatic order (such as num: date) in the blueprint for a page, the num number is set correctly when you switch the page status to published, but lost once you re-save the page.
This issue can be easily reproduced in the starterkit (tested: Beta 4, Beta 5):
Go to Blog -> Content in Kirby
Change something in the text or just hit cmd + s
If you go back to the blog overview or just hit F5 the page status is now unlisted (In Review )
How to fix
For me changing PageActions/update does the trick. You need to pass a dummy num to changeNum.
// if num is created from page content, update num on content update
if ($this->isListed() === true && in_array($this->blueprint()->num(), ['zero', 'default']) === false) {
$this->changeNum(1);
}
I would create a pull request for this, but I'm not 100% sure that always passing 1 as a dummy value for num is correct.
If you define a value for automatic order (such as
num: date
) in the blueprint for a page, the num number is set correctly when you switch the page status to published, but lost once you re-save the page.This issue can be easily reproduced in the starterkit (tested: Beta 4, Beta 5):
How to fix For me changing PageActions/update does the trick. You need to pass a dummy num to changeNum.
I would create a pull request for this, but I'm not 100% sure that always passing 1 as a dummy value for num is correct.