diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 93c5c78..5fcf1da 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -21,7 +21,7 @@ class BookTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('book', 'block', 'node_access_test');
+  public static $modules = array('book', 'block', 'node_access_test', 'comment');
 
   /**
    * A book node.
@@ -67,8 +67,12 @@ function setUp() {
 
     // Create users.
     $this->book_author = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books'));
-    $this->web_user = $this->drupalCreateUser(array('access printer-friendly version', 'node test view'));
-    $this->admin_user = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books', 'administer blocks', 'administer permissions', 'administer book outlines', 'node test view', 'administer content types', 'administer site configuration'));
+    $this->web_user = $this->drupalCreateUser(array('access printer-friendly version', 'node test view', 'access comments', 'post comments'));
+    $this->admin_user = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books', 'administer blocks', 'administer permissions', 'administer book outlines', 'node test view', 'administer content types', 'administer site configuration', 'access comments', 'post comments'));
+
+    // Create comment field on article.
+    $this->container->get('comment.manager')->addDefaultField('node', 'book');
+
   }
 
   /**
@@ -207,7 +211,7 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F
     $this->drupalGet('book/export/html/' . $node->id());
     $this->assertText($node->label(), 'Printer friendly title found.');
     $this->assertRaw($node->body->processed, 'Printer friendly body found.');
-
+    $this->assertNoText('Add new comment', '"Add new comment" not found');
     $number++;
   }
 
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 8debaef..5f83fea 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -543,11 +543,15 @@ function comment_entity_view(EntityInterface $entity, EntityViewDisplayInterface
           }
         }
       }
-      elseif ($view_mode != 'search_index' && $view_mode != 'search_result') {
+      elseif ($view_mode == 'search_index' || $view_mode == 'search_result' || $view_mode == 'print') {
+        // We don't want this link if we're building the entity for:
+        // - search indexing
+        // - constructing a search result excerpt.
+        // - print
+      }
+      else {
         // Entity in other view modes: add a "post comment" link if the user is
         // allowed to post comments and if this entity is allowing new comments.
-        // But we don't want this link if we're building the entity for search
-        // indexing or constructing a search result excerpt.
         if ($commenting_status == COMMENT_OPEN) {
           $comment_form_location = $instance->getSetting('form_location');
           if (user_access('post comments')) {
