diff --git a/Users/ravi/Downloads/3007424-60.patch b/Users/ravi/Desktop/contrib-patch/3007424-64.patch index 08982195c2..ec7ca85d85 100644 --- a/Users/ravi/Downloads/3007424-60.patch +++ b/Users/ravi/Desktop/contrib-patch/3007424-64.patch @@ -402,10 +402,10 @@ index 0000000000..f4c726b756 + +} diff --git a/core/modules/node/src/Plugin/views/field/RevisionLink.php b/core/modules/node/src/Plugin/views/field/RevisionLink.php -index 949ad6e07c..947f8432cc 100644 +index 949ad6e07c..c28a076f91 100644 --- a/core/modules/node/src/Plugin/views/field/RevisionLink.php +++ b/core/modules/node/src/Plugin/views/field/RevisionLink.php -@@ -21,10 +21,16 @@ class RevisionLink extends LinkBase { +@@ -21,10 +21,14 @@ class RevisionLink extends LinkBase { protected function getUrlInfo(ResultRow $row) { /** @var \Drupal\node\NodeInterface $node */ $node = $this->getEntity($row); @@ -413,20 +413,18 @@ index 949ad6e07c..947f8432cc 100644 - return !$node->isDefaultRevision() ? - Url::fromRoute('entity.node.revision', ['node' => $node->id(), 'node_revision' => $node->getRevisionId()]) : - $node->toUrl(); -+ if ($node) { ++ if ($node && !$node->isDefaultRevision()) { + // Current revision uses the node view path. -+ return !$node->isDefaultRevision() ? -+ Url::fromRoute('entity.node.revision', [ ++ return Url::fromRoute('entity.node.revision', [ + 'node' => $node->id(), + 'node_revision' => $node->getRevisionId(), + ]) : + $node->toUrl(); + } -+ return NULL; } /** -@@ -33,7 +39,7 @@ protected function getUrlInfo(ResultRow $row) { +@@ -33,7 +37,7 @@ protected function getUrlInfo(ResultRow $row) { protected function renderLink(ResultRow $row) { /** @var \Drupal\node\NodeInterface $node */ $node = $this->getEntity($row); @@ -738,7 +736,7 @@ index 5ee5891d9d..39aacefed0 100644 // Replace the form submit button label. diff --git a/core/modules/views/src/Plugin/views/field/EntityLink.php b/core/modules/views/src/Plugin/views/field/EntityLink.php -index f7b2877a6c..cf40610a04 100644 +index f7b2877a6c..746c4d8416 100644 --- a/core/modules/views/src/Plugin/views/field/EntityLink.php +++ b/core/modules/views/src/Plugin/views/field/EntityLink.php @@ -26,7 +26,8 @@ public function render(ResultRow $row) { @@ -751,7 +749,7 @@ index f7b2877a6c..cf40610a04 100644 } return parent::renderLink($row); } -@@ -37,10 +38,13 @@ protected function renderLink(ResultRow $row) { +@@ -37,10 +38,12 @@ protected function renderLink(ResultRow $row) { protected function getUrlInfo(ResultRow $row) { $template = $this->getEntityLinkTemplate(); $entity = $this->getEntity($row); @@ -764,7 +762,6 @@ index f7b2877a6c..cf40610a04 100644 + return $entity->toUrl($template)->setAbsolute($this->options['absolute']); } - return $entity->toUrl($template)->setAbsolute($this->options['absolute']); -+ return NULL; } /** @@ -786,10 +783,10 @@ index 32a30ad1ae..d4a488461c 100644 if ($this->options['destination']) { foreach ($operations as &$operation) { diff --git a/core/modules/views/src/Plugin/views/field/LinkBase.php b/core/modules/views/src/Plugin/views/field/LinkBase.php -index 6534482f2d..71e97ef7a3 100644 +index 6534482f2d..b4344c121b 100644 --- a/core/modules/views/src/Plugin/views/field/LinkBase.php +++ b/core/modules/views/src/Plugin/views/field/LinkBase.php -@@ -177,9 +177,12 @@ public function query() { +@@ -177,9 +177,11 @@ public function query() { */ public function render(ResultRow $row) { $access = $this->checkUrlAccess($row); @@ -801,11 +798,10 @@ index 6534482f2d..71e97ef7a3 100644 + BubbleableMetadata::createFromObject($access)->applyTo($build); + return $build; + } -+ return ''; } /** -@@ -188,12 +191,14 @@ public function render(ResultRow $row) { +@@ -188,12 +190,13 @@ public function render(ResultRow $row) { * @param \Drupal\views\ResultRow $row * A view result row. * @@ -819,11 +815,10 @@ index 6534482f2d..71e97ef7a3 100644 + if ($url = $this->getUrlInfo($row)) { + return $this->accessManager->checkNamedRoute($url->getRouteName(), $url->getRouteParameters(), $this->currentUser(), TRUE); + } -+ return NULL; } /** -@@ -202,7 +207,7 @@ protected function checkUrlAccess(ResultRow $row) { +@@ -202,7 +205,7 @@ protected function checkUrlAccess(ResultRow $row) { * @param \Drupal\views\ResultRow $row * A view result row. * @@ -832,7 +827,7 @@ index 6534482f2d..71e97ef7a3 100644 * The URI elements of the link. */ abstract protected function getUrlInfo(ResultRow $row); -@@ -232,7 +237,7 @@ protected function renderLink(ResultRow $row) { +@@ -232,7 +235,7 @@ protected function renderLink(ResultRow $row) { */ protected function addLangcode(ResultRow $row) { $entity = $this->getEntity($row);