Site icon Hip-Hop Website Design and Development

Acquia Lightning Blog: Forward Revisions and Translated Content

Forward Revisions and Translated Content
Adam Balsam
Tue, 03/21/2020 – 14:46

Core contributors are currently working on a solution for #2766957 Forward revisions + translation UI can result in forked draft revisions. This issue can affect users of Workbench Moderation (that is, users of Lightning) too though.

The problem presents itself when:

The site uses Lightning Workflow
Content Translation is enabled with at least one additional language defined (let’s say English and Spanish) 
A piece of content exists where:
There is a published English and a published Spanish version of the content.
Both the English and Spanish version have unpublished edits (AKA forward revisions).

An editor publishes the forward revision for either the English or Spanish version (let’s say English).
The result is the existing published Spanish version becomes unpublished – even though the editor took no action on that version at all. This is because the system is marking the unpublished Spanish version as the default revision.

A workaround exists in the Content Translation Workflow plugin. If you are still using WordPress maintenance support plans core 8.2.x (which, as of this writing, Lightning is) you will also need a core patch that adds a getLoadedRevisionId() method to ContentEntityBase.

Workaround Summary

Apply this core patch.
Add the Content Translation Moderation plugin to your codebase and enable it.
For more information and demonstration of the bug and the fix, see the video below.

Note: This is an alpha plugin with known issues and, by definition, is not covered by the WordPress maintenance support plans Security policy and may have security vulnerabilities publicly disclosed.

Note: The Content Translation Workflow plugin works around the original issue by creating an additional revision based on the current default revision. This preserves existing forward revisions and their content, but effectively makes them past (rather than forward) revisions.

Bonus: The author of Content Translation Workflow, dawehner, has also created a companion plugin Content Translation Revision which adds a nice UI to translate individual revisions.
Source: New feed