Restoring Content Using the Publishing History

Restoring Content Using the Publishing History

Each time a working copy is published, Scrivito adds it to your publishing history. It’s the key to finding and reactivating content that has meanwhile been altered or removed from your website. If, for example, you need to access an earlier version of a specific page, undelete a widget, or want to completely reset your website content to an earlier state, the publishing history lets you do it.

How the history works

When a working copy is published, it replaces the published content and is then no longer available. The version of the content published up to this point is archived and forms the publication history together with the previously published and archived versions. You can make further changes to the published content in a new or existing working copy.

On the sidebar, there is a “Publishing history” button which can be clicked if the published content is selected and the “Changes” mode is active. Clicking this button opens the sidebar panel for accessing the most recently archived versions via the “All content” tab (the working copy with the shaded background is the currently published content). Hovering over an item on the panel causes an “Open” button to show up that lets you create a working copy from the corresponding archived published version.

There are many and varied possible uses of the publishing history of which the particularly beneficial ones are outlined below.

Getting an overview of recent changes

Are you curious as to how your website has evolved while you were out? No problem, the publishing history lets you review all the changes that were made starting at a specific point in time.

First, as shown above, open the history panel and select the formerly published version to use as the point of reference. Click “open” to have a working copy created from this version.

Then open the changes list of the new working copy to see which pages, images, etc. have been added, altered, or deleted.

The elements in this list contain changes that would restore the corresponding archived content in this working copy when published. You can click an item you are interested in to view it in detail. Then, use the “Changes” view mode to visualize the differences between this former page and its published version.

[New in 1.21.0]Using the context menu of an item, you can discard the restoring changes if desired so that the corresponding published content is retained in this working copy.

  • If workflows are enabled for your Scrivito CMS, working copies containing archived content cannot be published directly because they are not subject to any workflow. Instead, first move the changes you wish to publish to a fresh working copy, and then publish it.

Returning to the last known good content

Mistakes are bound to happen – with Scrivito, you can undo them as long as they weren’t made too long ago.

What if your new workmate has “improved” half a dozen of often-visited pages by replacing your lean illustrations with “really convincing stuff”? Haven’t you two agreed on having extensive changes reviewed prior to publishing them? Well, next time you’ll probably point this out more clearly.

For now, let’s roll back to the published content visible before this happened:

Open the publishing history and find the version that was published immediately before the first unwanted “improvement”. Then, click the “Open” button of this history item to have a new working copy created in which the changes published since then are reverted.

For safety, check the changes list of the new working copy to make sure that you’re not undoing more than is required.

Then, publish the working copy to return to this “last known good” state of your website content. If your Scrivito CMS has workflows enabled, the changes first need to be moved to a different working copy (see below) which can then be published.

That was it! You could even roll back the rollback, but that’s a different story.

Selectively amending published changes

After working on large amounts of content and publishing the working copy, it might occur to you that you simply forgot to revert a few changes that have become obsolete in this process. So, how do you restore just a small number of pages, images, etc. from a previously published version to which hundreds of proper changes were made? Well, move the pages to restore to a different working copy!

So, again, first choose the relevant published version from the publishing history to have a fresh working copy created from it.

Then, open the changes list and click “Move changes”. The items on the changes list now have checkboxes, and you can select the individual CMS objects you wish to restore.

Afterwards, click “Select target working copy”. This opens a dialog box for choosing an existing or creating a new working copy. Do either of this to have your selected objects moved to the target working copy. (Note that the workflow selection dropdown is only present if workflows have been made available in your Scrivito CMS.)

You can now switch to this working copy and publish it right away, or review the changes, edit them, etc. and publish it afterwards. Finally, you may want to delete the source working copy that was created via the publishing history.

Determining when a particular page was changed and published

Sometimes, it can be important to determine the point in time at which a specific change to a particular page was made and published. To this end, you can select any two published content versions from the publishing history so that the time period in which you suspect the changes were made is covered. This causes exactly those changes to be visualized that were published between these two selected versions.

Here’s how to proceed: First, navigate to the page to inspect, then select the currently “Published content” from the “Working copies” sidebar. Now, open the “History” sidebar and make sure that its “Page” tab is selected. Scroll through the history items to find the published version you wish to use as the starting point of your comparison. Open its context menu, and click “Compare from here”. Finally, find the relevant and more recently published version to be included in the comparison, and select “Compare up to here” from its context menu. Now, you can start analyzing. If needed, you can revert changes as described above.

You can change the size of the time window for the comparison at any time, simply by applying the “Compare…” menu commands to published content versions that were published later or earlier.

New in 1.21.0

Restoring deleted widgets

You can copy a deleted widget from an archived version of the published content and paste it to a page in a working copy.

After selecting the published content from the “Working Copies” sidebar and activating the changes mode via the top bar, open from the history an archived version containing the deleted widget. Then, locate the widget there, copy it using the trashcan menu, and paste it where it’s needed.

Requirements and limitations

First, if the maximum number of working copies your plan includes has been reached, you won’t be able to utilize any of the archived versions of your published content simply because a fresh working copy is required for this.

Second, the maximum number of archived versions presented to you depends, again, on the plan. So, with a small plan, if you’re publishing frequently, archived versions may quickly disappear from your version history window.