In this exercise you will learn how to revert to a previous revision (or version) of your content.
Go to the Content Administration page by clicking on Content at the top left of the page and find the page you were editing in the previous exercises (3.1 and 4.1).
Click the Title link to get to the page.
Click the Revisions tab.
You should see a list of revisions similar to the screenshot below:
Locate the version before the current one and click on the Revert button on the right hand side
You will receive a prompt asking you to confirm whether you wish to revert to the selected revision, similar to the screenshot below. Click on Revert to complete the process.
You will be returned to the Revisions page. Note the following in this page:
The new revision has been created, showing the date, time and the author.
You are also be presented with a Status message indicating what has been performed.
The Current revision is the new revision you just created. Text on the left hand side indicates which revision this new revision is based on.
Navigate to the public view of the page (using an Incognito/Private window in your browser) and confirm if the content has been reverted.
Note: Only a previously Published revision can become the Current revision. A draft revision will create a new draft revision and the current published revision will remain as the Current revision.
Try reverting a revision in the status Draft. In the Revisions page you should see something similar to the screenshot below:
Note the following:
A new revision has been created, however;
The previous Published revision remains as the Current revision
In this exercise you will learn how to view your revision history for a piece of content.
Follow these steps to find the change history for the test Standard Page you worked on in Exercise 3.1 - Create some content:
Navigate to the Content Administration page by clicking on Content at the top left of the page, and find the page you edited in exercise 3.1.
Click the Title link to access the page.
Click the Revisions tab (see screenshot below for an example).
Tip: When saving content changes it’s a good idea to leave a short but descriptive Revision log message. This can help you and other Content Editors understand what changes were made in each revision (which is particularly handy if you need to revert to an older version).
GovCMS creates a new revision every time a content page is updated. This allows you to track how the content has changed over time on your site.
To view and manage revisions, use the Revisions tab. To access this, navigate to the Content page, then click on a piece of content. Then click on the Revisions button (highlighted in the screenshot below):
From the Revisions tab, you can view the individual revisions, revert to an earlier revision, and delete revisions.
Information about each revision of the content is displayed, including :
Date and time of the revision.
Who updated the content (creating the revision).
The revision log message, if entered and the status of the revision at the time it was created (in brackets).
Radio buttons used to select revisions to Compare (see below).
Operations dropdown, which allows a user to Revert the content to the selected revision, or Delete the selected revision.
The Compare selected revisions button (see below for information on this feature).
These items are highlighted and numbered in the following screenshot:
Note: Depending on your website configuration, not every user role can access the Revisions tab.
There are two main ways to view the differences between revisions.
Firstly, clicking on the date and time link of a given revision will take you to that revision or version of the file (see 1. in the screenshot above).
Secondly, to see the differences between two different revisions select the radio buttons in the rows of the revisions you wish to compare, then click on the Compare selected revisions button.
The screenshot below shows what was changed between the versions, namely:
Renaming the page.
Addition of a Featured image and a Thumbnail image.
It also shows which revisions of the page are being compared (3.)
GovCMS also creates a new revision when a user reverts to a previous revision.
If you have four revision versions (eg, 1, 2, 3 and current, when you revert to #2, then a copy of #2 is made and the copy is set as the current revision.
After the reversion, there are five versions/revisions (1, 2, 3, 4 and current), where current is a clone of #2.
Another useful feature of the revision system is the Revision log message field, which appears near the Create a new revision checkbox at the top right of the content editing form.
If a message is added to this field when creating a revision, the message will appear on the Revisions tab along with the revision.
While the Revision log message is an optional field, it is recommended to add a meaningful message whenever a revision is created. This is so that others (or you, months later) can see why the content was changed and what the changes were, without having to actually view previous revisions.
Scheduled transitions is useful if you want to update the revision at a specified date/time.
To schedule a transition, simply navigate to the "Schedule transitions" tab as shown below:
Then click on "Add Scheduled transition":
Select the revision to transition, and then set the new transition state along with the execution time and date as shown below:
After clicking on the "Schedule transtion" button, the confirmation screen looks like this:
You can find all pending scheduled transitions by going to Content >> Scheduled transitions as show below:
The transition will be executed at the specified time (thanks to the automatic cronjobs).
A crucial point to keep in mind is that cron runs once every hour at a randomly chosen minute. Therefore, it is possible that the transition may not occur precisely at the specified time. Nevertheless, it will be executed within one hour of the designated time.