Hi everyone,
I’m currently trying to compare a page that has been updated via the panel with its state before the update:
kirby()->hook('panel.page.update', function ($page, $oldpage) {
$dir = kirby()->roots()->index() . DS . 'panel.page.create.txt';
file_put_contents($dir, $oldpage->title() . ' --> ' . $page->title());
});
Unfortunately the title of both objects ($page and $oldpage) represents the state after the update though I would expect the $oldpage->title() to hold the title before the update event.
Are there any settings I have to change in order to be able to use the $oldpage object?
I’m using Kirby v2.5.12