# Umbraco preview mode producing stale content in ContentPublishingNotification

**URL:** <https://forum.umbraco.com/t/umbraco-preview-mode-producing-stale-content-in-contentpublishingnotification/8574>\
**Category:** Questions\
**Tags:** extending, v17\
**Created:** [September 22, 2026, 8:28am UTC](https://forum.umbraco.com/t/umbraco-preview-mode-producing-stale-content-in-contentpublishingnotification/8574 "2026-09-22T08:28:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jawood1](https://forum.umbraco.com/user_avatar/forum.umbraco.com/jawood1/32/4349_2.png) [@jawood1](https://forum.umbraco.com/u/jawood1)\
**Post date:** [September 22, 2026, 8:28am UTC](https://forum.umbraco.com/t/umbraco-preview-mode-producing-stale-content-in-contentpublishingnotification/8574/1 "2026-09-22T08:28:39Z")

</div>

Hi all,

I have a package that essentially allows you to do strongly typed validation with `IPublishedContent`. The code hinges on being able to retrieve the preview state of a page during a `ContentPublishingNotification` so that in turn we can validate against the published content.

Recently I was testing a new release on Umbraco (17.6.2) and started noticing I was getting stale preview content when using save and publish. This meant that when a value was changed it would initially retrieve it’s non dirty value causing incorrect validation states and then a following publish it would update. However, if I first saved only then did a publish the values would be correct.

What confuses me that on older versions roughly around \<= 17.3.0 it does work as expected so I’m unsure why this would be the case now? I presume this is a change in the underlying Umbraco code which means it’s not refreshed from when the content is saved and the publishing notification retrieves the preview content.

Does anyone have any suggestions of the best way to achieve the desired behaviour or if it’s just a non starter? I see other packages use the same technic but perhaps within the notification handlers this is a step too far.

For reference:

The notification handler: [Umbraco.Community.CustomValidator/src/Umbraco.Community.CustomValidator/Notifications/ContentValidationNotificationHandler.cs at 2809baeaddc83b9ddc4f50e84a0e4e549b70635a · jawood1/Umbraco.Community.CustomValidator · GitHub](https://github.com/jawood1/Umbraco.Community.CustomValidator/blob/2809baeaddc83b9ddc4f50e84a0e4e549b70635a/src/Umbraco.Community.CustomValidator/Notifications/ContentValidationNotificationHandler.cs)

---

<div class="post-metadata">

**Author:** ![justin-nevitech](https://forum.umbraco.com/user_avatar/forum.umbraco.com/justin-nevitech/32/6219_2.png) [@justin-nevitech](https://forum.umbraco.com/u/justin-nevitech)\
**Post date:** [September 22, 2026, 10:23am UTC](https://forum.umbraco.com/t/umbraco-preview-mode-producing-stale-content-in-contentpublishingnotification/8574/2 "2026-09-22T10:23:19Z")

</div>

Hi @jawood1

I’ve had a look into this. The cache refresh doesn’t fire straight away, it’s queued and only flushed once the current scope completes. Umbraco’s docs confirm it, `ContentSavedNotification` and `ContentPublishedNotification` are “published upon successful completion of the current scope”. That’s what triggers the cache update.

`ContentPublishingNotification` is different, it’s cancelable, so it fires immediately rather than waiting for scope completion, that’s how it’s able to stop the operation. If your handler runs inside a scope that hasn’t completed yet, it’ll see the cache as it was before that scope’s changes were flushed.

Save then publish as two separate operations each gets its own scope, so the first one’s cache refresh has already been flushed by the time the second starts, that lines up with why that combination works for you and a single save-and-publish doesn’t.

The correct way to get the values would be `ContentPublishingNotification.PublishedEntities`, it gives you the `IContent` with the new values directly, no cache involved. Doesn’t help you here though since you need the `IPublishedContent` for your strongly typed models.

I couldn’t find anything in the changelogs confirming a change to this behaviour between versions, so worth raising with HQ to get it confirmed.

Justin

---

<div class="post-metadata">

**Author:** ![jawood1](https://forum.umbraco.com/user_avatar/forum.umbraco.com/jawood1/32/4349_2.png) [@jawood1](https://forum.umbraco.com/u/jawood1)\
**Post date:** [September 22, 2026, 10:47am UTC](https://forum.umbraco.com/t/umbraco-preview-mode-producing-stale-content-in-contentpublishingnotification/8574/3 "2026-09-22T10:47:00Z")

</div>

Hi, thanks for getting back to me it does sound like something to ask HQ.

I wonder if this something better achieved with a custom notification but that’s one for me to look into more.
