Field content updated via hook not updating in panel

Hi all,
I just updated my little project after quite some time to Kirby 3.4.4 and had to migrate my page.update:after hook like written in the 3.4.0 release notes.

I had set up my old hook via trial and error due to lack of knowledge, but it worked fine so far. Now after the migration, it is working so far, that my content is getting updated like expected in the content file after saving page changes, but these changes are not visible in the panel. I only can see them after reloading the page.

I read the Panel issues guide but can’t find anything with OPCache or mod_expires set in my installation.

Actually, I am not sure about my use of $newPage.

This is my hook:

    'page.update:after' => function ($newPage, $oldPage) {
      if($newPage->keywords()->exists() && $newPage->keywords()->isNotEmpty()) {
        $keywords = $newPage->keywords()->split();
        sort($keywords);
        $keywords = implode(",",$keywords);
        try {
          $newPage->update(array(
            'keywords' => $keywords,
          ));
          } catch(Exception $e) {
            echo $e->getMessage();
          }
        }
      }

Thank you!

In which version did this work without reloading the page?

I think it was 3.3.0

Hm, I can’t really remember if the behavior was different and if so, what changes could have caused this to be no longer the case. In any case, yes, I can confirm that the Panel page is only updated after reload (but then I wouldn’t have expected anything else).

Okay, seems that I am remembering it wrong. Maybe I will check a backed up version.