- πΊπΈUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β as a guide.
Did not test
But for tests requested in #7
- πΈπͺSweden marcusml
This makes it more difficult for sites to comply with GDPR as it can be difficult to remove unlawful personal data.
Well this depends on how you look at it. If we consider revisions as a backup, then everything is fine. We only have to ensure that the revisions cannot be accessed. If you still want to delete a specific translation from all revisions, then this is still possible even with the current issue:
$entity_type_id = 'xyz'; $entity_id = 1092; $remove_translation_langcode = 'abc'; $entity_type_manager = \Drupal::entityTypeManager(); $entity_type = $entity_type_manager->getDefinition($entity_type_id); $storage = $entity_type_manager->getStorage($entity_type_id); $revisions = $storage->getQuery() ->condition($entity_type->getKey('id'), $entity_id) ->condition($entity_type->getKey('langcode'), $remove_translation_langcode) ->allRevisions() ->execute(); foreach (array_keys($revisions) as $revision_id) { $revision = $storage->loadRevision($revision_id); $revision->removeTranslation($remove_translation_langcode); $revision->save(); }
This doesn't seem to be true (anymore at least). I'm currently trying to clean up translations from old revisions. Removing a translation from a revision and calling save() on it results in a new revision being created with the translation removed. Instead of the translation being removed from the loaded revision.
I haven't yet found a way in which the Entity API allows me to remove a translation from a revision. Setting
$revision->setNewRevision(FALSE);
doesn't make it work either. - πͺπΈSpain facine
@marcusml, you need to set syncing flag to TRUE or a new revision will be created.
https://www.drupal.org/project/drupal/issues/2803717#comment-13080838 β