Allow usage of revision comparison inside workspaces

Created on 30 June 2022, about 2 years ago
Updated 8 September 2024, 20 days ago

Problem/Motivation

The workspaces module is basically built on top of revisions, thus it makes sense to be able to use the comparison diff provides also inside workspaces.

Steps to reproduce

On Vanilla Drupal 9:

  • Enable diff and workspaces
  • Create an article
  • Switch to the Stage workspace
  • Edit the content to create a revision
  • Click the "Revisions" tab on the node
  • Select the revisions and and at the bottom click "Compare selected revisions"(still inside the workspace)

This will fail displaying a message like "This form can only be submitted in the live workspace".

Additionally, see 📌 Incompatible with diff module Needs work where there are some other blockers to supporting this.

Proposed resolution

Using the API which 📌 Add an API for allowing modules to mark their forms as workspace-safe Needs work would introduce, we can add an event subscriber that marks the comparison form "workspace safe".

Also, a mild refactor of the Diff form to make getting the revision IDs easier.

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024