Concurrent update of content overwrites published content

Hi everyone,

I have a problem with editors being able to overwrite each other’s change of the same node which is of the same or different language variant. I will describe the issue with an example.

Umbraco version: 13.1.0

Description:

Imagine two editors, Alice and Bob, working on the same page of the same language variant in the backoffice.

  1. Alice opens the page, makes changes, saves, and publishes it.

  2. Meanwhile, Bob had already opened the same page before Alice made her changes. Without realizing it, he saves and publishes the page without making any edits.

Since Bob’s version doesn’t include Alice’s updates, he unknowingly overwrites her changes, effectively erasing them.

This overwriting can also happen if Alice opens the English version of the page while Bob had the Danish version open for a long time.

  1. Alice makes changes to the English version, saves, and publishes.
  2. Bob then switches to the English version (without refreshing or seeing Alice’s updates), saves, and publishes.

At this point, Bob won’t see Alice’s changes—the only message he’ll notice is “Published (Pending changes)” for the language variant.

Why does this happen?

Alice’s updates aren’t immediately visible to Bob, so when he saves, he accidentally replaces everything, including Alice’s changes. Changes would only be visible to Bob if the page would be refreshed.

My questions:

  • Is there a solution or workaround for this issue?
  • Would the Umbraco NuGet package update solve this issue? Since the latest version for the major version 13 is 13.7.2.

As far as I know, there is nothing to prevent this by default. I think @warren is creating some kind of locking package if I’m not mistaken. Not sure if there already is a version for Umbraco 13 available.

I attempted a solution to resolve this issue by creating and registering a notification handler for the ContentSavingNotification. In this handler, I compared the VersionId, PublishDate, and PublishedVersionId properties from the SavedEntities in the notification object to the same properties of the node fetched using the GetById method from the content service. I expected that the property values of the node returned by the GetById method will be different compared to the SavedEntities properties. However, for some reason, the property values were identical. The key goal is to prevent content from being overwritten
Could this be a viable approach?

It does sound like a solid plan and I know that you should be able to see the changes. It’s too bad the editor will only know that he or she can’t save when they have made all their changes already.