diff --git a/core/modules/comment/comment.routing.yml b/core/modules/comment/comment.routing.yml index fc420d9..e8f6a28 100644 --- a/core/modules/comment/comment.routing.yml +++ b/core/modules/comment/comment.routing.yml @@ -24,6 +24,7 @@ comment_reply: pattern: 'comment/reply/{node}/{pid}' defaults: _content: '\Drupal\comment\Controller\CommentController::getReplyForm' + _title: 'Add new comment' pid: ~ requirements: _entity_access: 'node.view' diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php index 65b590d..fcedd4d 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -248,7 +248,7 @@ public function getReplyForm(Request $request, NodeInterface $node, $pid = NULL) $comment = $this->entityManager->getStorageController('comment')->create(array( 'nid' => $node->id(), 'pid' => $pid, - 'node_type' => 'comment_node_' . $node->bundle(), + 'node_type' => 'comment_node_' . $node->getType(), )); $build['comment_form'] = $this->entityManager->getForm($comment);