Introducing Smart Content Auto-Merging

Scrivito working copies are virtual copies of the entire website and a feature that allows editors to change content safely in a sandbox. A working copy lets you change or add as much content as you want or need to, and publish everything at the push of a button. Sometimes, it’s just a single typo on a page; at other times, dozens of pages are touched, images uploaded, etc., before a working copy finally gets published. For editors, the ability to work in parallel without getting into each other’s way is a blessing.

In general, it’s best to publish as soon as content changes are ready. In a working copy, intermediate publishes are automatically applied, so that all working copies reflect the currently published content. We call this auto-merging. However, for natural reasons, there is an exception: the pages and assets that have been altered in your working copy are not updated automatically when concurrent edits to the same pages or assets are published.

What are concurrent edits?

Did you ever run into a situation in which you weren’t able to publish a working copy because of conflicting changes? This happens if someone alters a page and publishes their working copy while you are working on exactly the same page in a different working copy. It doesn’t happen often, not least because Scrivito has a warning indicator that brings actual or potential conflicts to the editors’ attention.

Auto-merging used to operate on a page level, meaning that no matter what two people had altered on the same page, it caused a conflict after publishing one of the two working copies. We felt that this behavior was worth improving.

Instant content updates through finer grained auto-merging

We improved the way Scrivito detects concurrent editing by no longer looking at pages as a whole but at their components: widgets, the page title, or the page description in the properties, etc.

So, for example, if you change some text in a widget, and one of your team exchanges an image on the same page in a different working copy, the changes are silently merged and become visible after any of the two working copies is published. Previously, this would have been a conflict that would have prevented publishing the second working copy.

The same applies if, for example, one editor exchanges the image of an image widget, while another one changes the caption of the same image widget on the same page, but in a different working copy. There wouldn’t be a conflict even if both editors published. However, if they both exchange the image or alter the caption of the same image widget, they will receive a conflict warning, and only one of the two working copies could be published.

Note that concurrently rearranging the widgets contained in a widget list also doesn’t produce a conflict anymore. Scrivito will always try to find the optimal position of a widget that has been shifted around in two working copies. 

Final note

Auto-merging is not part of the Scrivito SDK but of the Scrivito CMS service, so there’s no need to update your app to benefit from this feature!
Happy publishing! 

Do you have any questions or would like to share your thoughts or give feedback? You’re welcome!