Skip to content

Commit d557675

Browse files
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.
1 parent e70c72e commit d557675

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

modules/next/src/NextEntityTypeManager.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match): ?Enti
7272
if ($node_revision instanceof NodeInterface) {
7373
return $node_revision;
7474
}
75-
76-
if ($route_match->getRouteName() === 'entity.node.latest_version') {
77-
return $route_match->getParameter('node');
78-
}
79-
80-
return $this->entityTypeManager->getStorage('node')->loadRevision($node_revision);
8175
}
8276

8377
foreach ($route_match->getParameters() as $parameter) {

0 commit comments

Comments
 (0)