Problem/Motivation
When an entity is created in workspace A, then edited and published from workspace B (bypassing the single-workspace editing protection, as some contrib and custom modules do), the entity's default revision becomes live content. Deleting workspace A still purges the whole entity, because it's tracked as initially created in A, so published live content is lost.
Even though core alone doesn't allow you to get in this situation right now, deleting the published default revision is still a data-loss bug.
Steps to reproduce
This can be reproduced with the Parallel Workspaces contrib module, or any custom code solution that allows you to track an entity in multiple workspaces.
Proposed resolution
The purge process must never delete an entity whose default revision is published. When the tracked initial revision is reached and the entity is published, only the revisions created in the deleted workspace are removed; the live entity is kept. If the initial revision is itself the published default, only its tracking records are removed.
Remaining tasks
Review.
User interface changes
Nope.
Introduced terminology
N/A
API changes
Nope.
Data model changes
Nope.
Release notes snippet
N/A
Issue fork drupal-3611989
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
amateescu commented