This document explains how to identify and resolve version conflicts for pages in Drupal Canvas. Edits to a page in Drupal Canvas save as unpublished changes. A conflict occurs if the published version of a page is updated outside of Drupal Canvas before publication. For example, through a connected GitHub repository. Conflict resolution identifies these conflicts to prevent accidental overwrites of concurrent work. Drupal Canvas flags the affected page, displays a side-by-side comparison of the published and new versions, and enables the selection of the appropriate version to retain. The following procedures guide you to detect conflicts, compare the versions, and select the version to retain before you publish the page.
Important considerations
- Conflict resolution applies to Drupal Canvas pages.
- The version you retain applies to the entire page. Merges of specific parts of the Published version and the New version are unsupported.
- Retention of the Published version permanently discards unpublished changes to that page in Drupal Canvas. This action is irreversible.
- Publication of a page with an unresolved conflict is blocked. Ensure that the resolution of all conflicts on a page occurs before selection for publication.
- Certain conflicts remain unresolvable from the conflict resolution view. If the system displays a prompt to refresh the page, refresh the browser to continue. Unresolvable conflicts occur for the following reasons:
- Concurrent user edits: Multiple users update the same entity simultaneously through the Drupal Canvas UI.
- Entity deletion: The underlying entity is deleted just before a user attempts to publish the entity.
- Data staleness: Stale hashes exist in an auto-save during a POST or PATCH request.
Prerequisites
Before you can use conflict resolution in Drupal Canvas, ensure the following:
- Connected GitHub Repository: Your Acquia Source CMS site must be connected to a GitHub repository. Conflicts appear after changes push to the main branch or production branch of this repository while active autosaves exist in Drupal Canvas. For more information, visit GitHub sync.
- User Permissions: You must have a role with permissions to Review and Publish changes. Users who only have Draft or Edit access may see conflict indicators, but their permissions do not allow them to perform the resolution. For more information, visit Managing permissions.
- Active Autosave: You must have at least one unpublished change on a page or component. An external update to this page or component triggers the conflict resolution feature.
Conflict detection
Drupal Canvas checks for conflicts during active edits and during publication. Drupal Canvas detects conflicts after a single page meets both of the following criteria:
- The page contains unpublished changes in Drupal Canvas.
- External updates and publication of the page occur outside Drupal Canvas.
After a conflict appears, Drupal Canvas displays a notification and blocks publication of the affected page until you resolve the conflict.
Conflicts appear in the following locations:
- Status message: Displays a conflict detected message.
- Activity Center: Displays a conflict detected entry and the conflict timestamp.
- Unpublished changes panel: Displays a Resolve [#] conflicts banner, and marks each affected page in red with a warning icon.
The following conditions apply to page selection during a conflict:
Pages with conflicts are unavailable for selection.
If selection occurred before conflict detection, Drupal Canvas clears the selection.
Selection for publication becomes available only after conflict resolution.
To identify conflicting pages:
- Access your site.
- On the top right, click Edit to open Drupal Canvas.
- On the top center, click the page title to open the navigator and select a page to review.
- On the top left, select Review [#] change to open the Unpublished changes panel.
- Review the [#] conflict to resolve banner to determine the number of conflicts that require attention.
- In the list of changes, identify the pages marked in red with a warning icon.
To resolve a conflict:
- Identify the conflicting pages.
- Open the conflict resolution view with one of the following methods:
- In the Unpublished changes panel, click Resolve [#] conflicts.
- Next to a conflicting page, select the ellipsis (...) icon and select Resolve conflict.
- Review the two versions displayed side by side:
- Select the card of the version to retain. A highlighted border indicates the selection.
Click Resolve conflict.
Retention of the Published version discards the unpublished changes in Drupal Canvas. Retention of the New version retains the changes and resolves the conflict to enable publication.
- If multiple conflicts exist, click Next and Previous at the bottom of the view to move through the conflicts. The position indicator displays the active conflict. For example, the indicator displays Review 1 of 3.
- Resolve all conflicts.
Drupal Canvas displays an Everything is up to date message. - Click Review changes to return to the list of changes or click Close to exit.
Previewing version comparisons
To adjust the preview of each version:
- Open the conflict resolution view.
- Click the Visual tab.
- Select a device from the list to preview a version at a different screen size. For example, Large desktop.
- Use the zoom control to modify the zoom level.
- Use the snap to fit control to fit icon the preview to the available space.
- Click Open in new tab icon icon on a version to open the fully rendered page in a separate browser session.
Publishing after resolving a conflict
After conflict resolution, pages become available for publication.
To publish changes:
- Open the Unpublished changes panel.
- Select the pages for publication. Pages with unresolved conflicts remain unavailable for selection.
- Select Publish [#] selected.
For more information about the review and publication of changes, visit Using Drupal Canvas.