Redirect panel when page is moved after content update

For a site migration with many chronologically sorted pages (4000+ existing, ~1000 new per year), I’m organizing them into date-based subfolders for performance reasons. Pages are stored at /archive/2025/10/<page-uid>, URLs are rewritten to /archive/2025-10-<page-uid>, and a custom route handler resolves the actual page path.

Editors shouldn’t need to worry about this folder structure—it should be derived automatically from a date field:

  • New drafts are stored in /archive/_drafts/
  • When published, pages move to their date-based folder (e.g., /archive/2025/10)

Moving pages when they change status is working via the page.changeStatus hook.
I’ve also overridden the submit method of Kirby’s page.changeStatus dialog to return a redirect field (like the page.move dialog does), which successfully redirects the Panel after publishing

But how can i redirect the panel to the new location when a published page date field is changed?
I move the page to its new date-based location in a page.update:after hook. However, the Panel throws an error because it can’t find the page at the old location anymore.

@Ove did you manage to get this working? I’m in the same situation and can’t seem to find a working solution :slight_smile:
Thanks!

Spoke with @distantnative about this at the Beyond Tellerand conf in Berlin. Moving published pages in the `page.update` hook is currently not possible.

I’ve just accepted this for now. But since there’s a lot going for v6 i’m crossing my fingers that this might be possible in the future.

1 Like

Thanks, that helps a lot! In my case I ended up changing the events folder structure to group events by year, the website editors just need to create the events in the right folder — a bit more manual work than I was hoping for, but it works for them :slight_smile: