Skip to content
Snippets Groups Projects

Issue #3295076: Migrate rollback for translations doesn't work

2 unresolved threads
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -171,7 +171,8 @@ class EntityReferenceRevisions extends EntityRevision implements ConfigurableInt
* The IDs of the destination object to delete.
*/
protected function rollbackTranslation(array $destination_identifiers) {
$entity = $this->storage->loadRevision(array_pop($destination_identifiers));
$revision_id = $destination_identifiers['revision_id'];
$entity = $this->storage->loadRevision($revision_id);
if ($entity && $entity instanceof TranslatableInterface) {
if ($key = $this->getKey('langcode')) {
if (isset($destination_identifiers[$key])) {
@@ -196,7 +197,7 @@ class EntityReferenceRevisions extends EntityRevision implements ConfigurableInt
* The IDs of the destination object to delete.
*/
protected function rollbackNonTranslation(array $destination_identifiers) {
$revision_id = array_pop($destination_identifiers);
$revision_id = $destination_identifiers['revision_id'];
$entity = $this->storage->loadRevision($revision_id);
if ($entity) {
if ($entity->isDefaultRevision()) {
Loading