Describe the bug
If an object is updated from a controller:
return function($kirby, $page) {
$kirby->impersonate('kirby');
$page = $page->update(['test' => uniqid()]);
return [
'page' => $page
];
};
the updated $page is not available in the template and in snippets as Kirby overrides the returned object with the original $page.
Expected behavior
The updated $page should be provided to the template and snippet. It would be awesome if this would automatically happen even if $page is not manually returned from the controller.
Kirby Version
3.3.5
Additional context
Original discussion in #2555.