Hook page.changeStatus:after not passing pagevars

I’m having problems since a Kirby update with the page.changeStatus:after hook in my config.php file in all my websites.

The hook is fired but it seems that there are no pagevariables passed.
I tested in Kirby 3.5 and it get the same error in a new plain 3.6 Starterkit version. It worked in Kirby 3.3.

When i test with page.update:after, it works!

Am i doing something wrong? Or could this be a bug?

  'page.changeStatus:after' => function($newpage,$oldpage){
     $template= $newpage->intendedTemplate();
     if($template =="text-page"){
          $update= $newpage->update(["text"=>"test"]);

Hook variables changed in Kirby 3.5: page.changeStatus:after | Kirby CMS

Always check the changelogs for breaking changes when updating between major versions.

Thanks Texnixe!!

I didn’t know i needed to use the exact variable names (i changed $newpage to $newPage and $oldpage to $oldPage). It works now!

(It’s strange that page.update:after does work with lowercase vars and page.changeStatus:after doesn’t)

What are you doing in your page.update:after hook?