Problem/Motivation

The delete prior revisions is also affected by #3543480: Revision translation affected for more than one language could lost translation - i.e. a revision that is considered the default and only revision in that language can be deleted.

Steps to reproduce

  1. Create node in en language (revision translation affected for en = 1);
  2. Create translation in de language with changing untranslated field (revision translation affected = 1 for both en and de).
  3. Create more revisions for en to have 2nd revision more than configure amount of revisions.
  4. Visit the revision delete form and check the text box to delete prior revisions.

This is also a bug in Drupal core because it allows you to delete the revision affecting multiple languages from revision screen in the language with multiple revisions but not from the other one.

Proposed resolution

  • Make the drush command and the UI use the same batch and code.
  • Move the active vid code from the queue worker to the node_revision_delete service
  • Use the moved functionality in the batch to avoid deleting active vids for a langauge
  • Add test coverage

Remaining tasks

None

User interface changes

Drush command no longer asks if you want to delete the vid you pass in.

API changes

  • New method on the node_revison_delete service
  • \Drupal\node_revision_delete\NodeRevisionDeleteBatch::previousRevisionDeletionBatch() returns a bool dependin gon whether it set a batch or not.

Data model changes

None

Command icon 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

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes
Status: Active » Needs review

  • alexpott committed 12d198c8 on 2.1.x
    fix: #3583390 Revision translation affected for more than one language...
alexpott’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this on a site with lots of revisions and multilingual - works great. Need to open a core issue about this problem.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.