You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you need to change something in a page automatically - in my case auto-generate title based on other fields - it was always best to do so in a page.update:after hook. In v5-beta.1, the originating update is saved correctly, the hook is run (and change persisted), but the tracking system (sometimes) incorrectly keeps the page marked as changed (or re-marks, maybe?).
Sometimes the yellow buttons popup right away, sometimes after refresh, sometimes they don't pop up at all and page isn't marked changed.
I observe this pretty often (> 80%) when the page is saved with ⌘S, but trigger it slightly less (60%?) while saving by clicking the save button.
Expected behavior
Page is saved
Hook runs
Page isn't marked by system as having changes
Screenshots
CleanShot.2024-12-16.at.22.27.28.mp4
To reproduce
Have a bluprint marked with changeTitle: false
Add following hook:
[
'page.update:after' => function (Page$newPage) {
kirby()->impersonate('kirby');
$p->save(['title' => 'Automatically changed title at '.time()]);
kirby()->impersonate(null);
}
]
Update a page of that blueprint couple of times and observe mayhem.
Note: additionally, I don't remember having to release the kirby impersonate call before, but now it triggers the "other user is editing this page" popup.
Your setup
Kirby Version
v5-beta.1
The text was updated successfully, but these errors were encountered:
Description
If you need to change something in a page automatically - in my case auto-generate
title
based on other fields - it was always best to do so in apage.update:after
hook. Inv5-beta.1
, the originating update is saved correctly, the hook is run (and change persisted), but the tracking system (sometimes) incorrectly keeps the page marked as changed (or re-marks, maybe?).Sometimes the yellow buttons popup right away, sometimes after refresh, sometimes they don't pop up at all and page isn't marked changed.
I observe this pretty often (
> 80%
) when the page is saved with ⌘S, but trigger it slightly less (60%
?) while saving by clicking the save button.Expected behavior
Screenshots
CleanShot.2024-12-16.at.22.27.28.mp4
To reproduce
changeTitle: false
Note: additionally, I don't remember having to release the kirby impersonate call before, but now it triggers the "other user is editing this page" popup.
Your setup
Kirby Version
v5-beta.1
The text was updated successfully, but these errors were encountered: