From e70c72e279d42dda3aee3002cc123ed2f92a9baa Mon Sep 17 00:00:00 2001 From: Marc Orcau Date: Tue, 23 May 2023 12:44:39 +0200 Subject: [PATCH 1/2] Issue #500: Fix wrong iFrame preview URL on "Latest version" tab for translations. --- modules/next/src/NextEntityTypeManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/next/src/NextEntityTypeManager.php b/modules/next/src/NextEntityTypeManager.php index b0950503f..dce4f9553 100644 --- a/modules/next/src/NextEntityTypeManager.php +++ b/modules/next/src/NextEntityTypeManager.php @@ -74,7 +74,7 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match): ?Enti } if ($route_match->getRouteName() === 'entity.node.latest_version') { - $node_revision = $route_match->getParameter('node')->getRevisionId(); + return $route_match->getParameter('node'); } return $this->entityTypeManager->getStorage('node')->loadRevision($node_revision); From d557675b055ce4e2a9b71171bd594cc4fd561a2a Mon Sep 17 00:00:00 2001 From: Bojan Bogdanovic Date: Thu, 18 Dec 2025 08:26:26 +0100 Subject: [PATCH 2/2] Fix revision loading to respect route language parameters Loading a revision now relies on the language parameters provided by route_match, ensuring the correct translated revision is returned instead of always falling back to the default language. --- modules/next/src/NextEntityTypeManager.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/next/src/NextEntityTypeManager.php b/modules/next/src/NextEntityTypeManager.php index dce4f9553..97849cee8 100644 --- a/modules/next/src/NextEntityTypeManager.php +++ b/modules/next/src/NextEntityTypeManager.php @@ -72,12 +72,6 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match): ?Enti if ($node_revision instanceof NodeInterface) { return $node_revision; } - - if ($route_match->getRouteName() === 'entity.node.latest_version') { - return $route_match->getParameter('node'); - } - - return $this->entityTypeManager->getStorage('node')->loadRevision($node_revision); } foreach ($route_match->getParameters() as $parameter) {