Note
With the release of Umbraco 17 we will be following the Umbraco release version numbers - so RollBackPreviewer v2 is for Umbraco 16 and under, the rest will follow v17, v18 etc
Enhance Umbraco's rollback functionality with visual rollback previews. This extension builds ontop of the existing Umbraco Rollback modal and allows for the JSON diff to be viewed as well as the visual diff. NEW FEATURE! You can now share the preview as a publicly available URL. With configurable outputs for a secret key to lock this down, and have an expiration time on the URL, this is the perfect way to share content with externals.
Add the package to an existing Umbraco website from nuget. From v1.0.0 you can install the same package on Umbraco 13+.
dotnet add package Umbraco.Community.RollbackPreviewer
Once the package installed it will automatically replace the current Rollback modal within Umbraco.
Important
The Rollback Previewer uses iFrames to function so you may need to adjust X-Frame-Options to see the preview
Add the configuration to the appsettings.json file as per below:
"RollbackPreviewer": {
// Set to true to enable the shareable button, appearing within the rollback modal
"EnableFrontendPreviewAuthorisation": true,
// Set as a string to use as a standard secret key (appended in the query string)
"FrontendPreviewAuthorisationSecret": "super-secret-key",
// Set to true to enable the shared URL to be time limited
"EnableTimeLimitedSecrets": true,
// Set to expire the link after this many minutes
"SecretExpirationMinutes": 60
}Clone the repository.
Head into the src\Umbraco.Community.RollbackPreviewer\Client and run the following to start the dev server:
npm ci
npm run dev
Open the sln file and run the Umbraco project, or head to the version you want (e.g. src\Umbraco.Community.RollbackPreviewer.TestSite.v17) and run dotnet run, (uSync will automatically import, if not, go import everything) and head to the home node within the CMS. Make a change and go to the Info app and click the Rollback button to see the visual diff.
Check out the Services.RollBackContentFinder for information on the fetching and displaying of the rollbacked version.
Login: [email protected] / 1234567890
Clone the repository.
Head into the src\Umbraco.Community.RollbackPreviewer\wwwroot\App_Plugins\UmbracoCommunityRollbackPreviewer.v13 and edit the files as you like. They are pushed through to the site via RCL and there are no npm tasks to run.
Open the sln file and run the Umbraco project, or head to src\Umbraco.Community.RollbackPreviewer.TestSite.v13 and run dotnet run, (uSync will automatically import, if not, go import everything) and head to the home node within the CMS. Make a change and go to the Info app and click the Rollback button to see the visual diff.
Check out the Services.RollBackContentFinder for information on the fetching and displaying of the rollbacked version.
Login: [email protected] / 1234567890
Contributions to this package are most welcome! Please read the Contributing Guidelines.
Check out the project for release / updates here
Mike Masey came up with the idea
Matt Brailsford provided the basis for converting internal models
Lotte Pitcher for her amazing Opinionated Starter Kit
Rollback icon created by maswan - Flaticon

