diff --git a/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php b/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php
index a4847fc..a2a8371 100644
--- a/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php
+++ b/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\node\Tests\Views;
 
 use Drupal\Component\Serialization\Json;
-use Symfony\Component\HttpFoundation\Request;
+use Drupal\user\Entity\User;
 
 /**
  * Tests views contextual links on nodes.
@@ -94,4 +94,30 @@ protected function renderContextualLinks($ids, $current_path) {
     ));
   }
 
+  /**
+   * Tests if the node page works if Contextual Links is disabled.
+   *
+   * All views have Contextual links enabled by default, even with the
+   * Contextual links module disabled. This tests if no calls are done to the
+   * Contextual links module by views when it is disabled.
+   *
+   * @see https://www.drupal.org/node/2379811
+   */
+  public function testPageWithDisabledContextualModule() {
+    \Drupal::service('module_installer')->uninstall(['contextual']);
+    \Drupal::service('module_installer')->install(['views_ui']);
+
+    // Ensure that contextual links don't get called for admin users.
+    $admin_user = User::load(1);
+    $admin_user->setPassword('new_password');
+    $admin_user->pass_raw = 'new_password';
+    $admin_user->save();
+
+    $this->drupalCreateContentType(array('type' => 'page'));
+    $this->drupalCreateNode(array('promote' => 1));
+
+    $this->drupalLogin($admin_user);
+    $this->drupalGet('node');
+  }
+
 }
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 2efa2d9..b2a42d2 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -307,7 +307,7 @@ function views_page_display_pre_render(array $element) {
  */
 function views_preprocess_html(&$variables) {
   // Early-return to prevent adding unnecessary JavaScript.
-  if (!\Drupal::currentUser()->hasPermission('access contextual links')) {
+  if (!\Drupal::currentUser()->hasPermission('access contextual links') && \Drupal::moduleHandler()->moduleExists('contextual')) {
     return;
   }
 
@@ -392,8 +392,8 @@ function views_preprocess_html(&$variables) {
  */
 function views_add_contextual_links(&$render_element, $location, ViewExecutable $view, $display_id) {
   // Do not do anything if the view is configured to hide its administrative
-  // links.
-  if ($view->getShowAdminLinks()) {
+  // links or if the Contextual Links module is not enabled.
+  if ($view->getShowAdminLinks() && \Drupal::moduleHandler()->moduleExists('contextual')) {
     // Also do not do anything if the display plugin has not defined any
     // contextual links that are intended to be displayed in the requested
     // location.
