Skip to content

Commit

Permalink
EWPP-1996: Fix DefaultNodeMetadataEventSubscriber.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Feb 18, 2022
1 parent 748e16b commit aaa081e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function getNode(NodeMetadataEvent $event): void {

if ($this->currentRouteMatch->getRouteName() === 'entity.node.revision') {
$node_revision = $this->currentRouteMatch->getParameter('node_revision');
$node = $this->entityTypeManager->getStorage('node')->loadRevision($node_revision);
$node = $this->entityTypeManager->getStorage('node')->loadRevision($node_revision->getRevisionId());
$translated_node = $node ? $this->entityRepository->getTranslationFromContext($node) : NULL;

$event->setNode($translated_node);
Expand Down

0 comments on commit aaa081e

Please sign in to comment.