Capture page URL slug change

Karlo Matan asked on January 16, 2026 15:05

Currently we are facing an issue with Cloudflare cache. We have an implemented cache clearing module that listens to document events and clears cache based on what was updated etc.

But the issue we have is that when we update the URL fragment for a page, it doesn't trigger the event listeners we currently have in place (in this case DocumentEvents). I've tried already with ObjectEvents but that did not seem to work either. Ideally we would catch the URL update and clear the cache from the old pre-updated URL.

Is there any solution to our current problem?

Recent Answers


Juraj Ondrus answered on January 19, 2026 13:34

I would try using object event handler for the "cms.pageurlpath" object type - this should be the one holding the page url paths.

1 votesVote for this answer Mark as a Correct answer

Faisal Ahmed Rony answered on April 5, 2026 14:41

Hey Karlo,

I totally get why that's happening—caching issues with URL changes are honestly the worst. It’s pretty common because Kentico doesn’t always treat URL path fragments as a standard document update, so those DocumentEvents might just miss them entirely.

Have you tried Juraj’s idea about the cms.pageurlpath object yet? Setting up an event handler like ObjectEvents.Update.After for that specific type usually does the trick when a slug gets changed.

One small thing you could try: use the e.ObjectBefore property in your code. It lets you snag the "old" URL right before it's gone, which is perfect for telling Cloudflare exactly which cache needs clearing.

Hope that clears things up for you!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.