diff -u b/core/modules/book/src/BookOutlineStorage.php b/core/modules/book/src/BookOutlineStorage.php --- b/core/modules/book/src/BookOutlineStorage.php +++ b/core/modules/book/src/BookOutlineStorage.php @@ -45,10 +45,10 @@ return $this->connection->query("SELECT DISTINCT(bid) FROM {book}")->fetchCol(); } elseif ($this->currentUser->hasPermission('view own unpublished content')) { - return $this->connection->query("SELECT DISTINCT(bid) FROM {book} b INNER JOIN {node_field_data} f ON b.nid = f.nid WHERE f.uid = $currentUserId OR f.status = 1")->fetchCol(); + return $this->connection->query("SELECT DISTINCT(bid) FROM {book} b INNER JOIN {node_field_data} f ON b.nid = f.nid WHERE b.pid = 0 AND (f.uid = $currentUserId OR f.status = 1)")->fetchCol(); } else { - return $this->connection->query("SELECT DISTINCT(bid) FROM {book} b INNER JOIN {node_field_data} f ON b.nid = f.nid WHERE f.status = 1")->fetchCol(); + return $this->connection->query("SELECT DISTINCT(bid) FROM {book} b INNER JOIN {node_field_data} f ON b.nid = f.nid WHERE f.status = 1 AND b.pid = 0")->fetchCol(); } }