From 79187354d89214462211ce3e11df575506381215 Mon Sep 17 00:00:00 2001 From: Govind Malu Date: Thu, 2 Mar 2023 16:45:26 +0530 Subject: [PATCH] Fixed preview link rendering on node revision. --- .../tide_site_preview/src/Plugin/Block/PreviewLinksBlock.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/tide_site_preview/src/Plugin/Block/PreviewLinksBlock.php b/modules/tide_site_preview/src/Plugin/Block/PreviewLinksBlock.php index 70c81058..40a81167 100644 --- a/modules/tide_site_preview/src/Plugin/Block/PreviewLinksBlock.php +++ b/modules/tide_site_preview/src/Plugin/Block/PreviewLinksBlock.php @@ -233,9 +233,7 @@ protected function getCurrentNode() : ?NodeInterface { $node = $this->routeMatch->getParameter('node'); if ($route_name === 'entity.node.revision') { try { - $vid = $this->routeMatch->getParameter('node_revision'); - $node = $this->entityTypeManager->getStorage('node') - ->loadRevision($vid); + $node = $this->routeMatch->getParameter('node_revision'); } catch (Exception $exception) { watchdog_exception('tide_site_preview', $exception);