diff --git a/disqus.module b/disqus.module
index 8c0d476..67ec78a 100644
--- a/disqus.module
+++ b/disqus.module
@@ -81,7 +81,7 @@ function disqus_node_links_alter(array &$node_links, NodeInterface $node, array
           // Display the Disqus link.
           $links['disqus_comments_num'] = array(
             'title' => t('Comments'),
-            'url' => $node->urlInfo(),
+            'url' => $node->toUrl(),
             'fragment' => 'disqus_thread',
             'attributes' => array(
               // Identify the node for Disqus with the unique identifier:
diff --git a/src/Plugin/views/field/DisqusCommentCount.php b/src/Plugin/views/field/DisqusCommentCount.php
index 312f61d..ad4776b 100644
--- a/src/Plugin/views/field/DisqusCommentCount.php
+++ b/src/Plugin/views/field/DisqusCommentCount.php
@@ -94,7 +94,7 @@ class DisqusCommentCount extends FieldPluginBase {
       // Build a renderable array for the link.
       $links['disqus_comments_num'] = array(
         'title' => t('Comments'),
-        'url' => $entity->urlInfo(),
+        'url' => $entity->toUrl(),
         'fragment' => 'disqus_thread',
         'attributes' => array(
           // Identify the node for Disqus with the unique identifier:
