diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 48e9b73..a62b167 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -232,10 +232,6 @@ function comment_menu() { 'file' => 'comment.admin.inc', 'weight' => 20, ); - $items['comment/reply/%node'] = array( - 'title' => 'Add new comment', - 'route_name' => 'comment_reply', - ); return $items; } diff --git a/core/modules/comment/comment.routing.yml b/core/modules/comment/comment.routing.yml index 74d4c88..96b04ab 100644 --- a/core/modules/comment/comment.routing.yml +++ b/core/modules/comment/comment.routing.yml @@ -21,9 +21,9 @@ comment_permalink: _entity_access: 'comment.view' comment_reply: - pattern: 'comment/reply/{node}/{pid}' - defaults: - _content: '\Drupal\comment\Controller\CommentController::getReply' - pid : ~ - requirements: - _entity_access: 'node.view' + pattern: 'comment/reply/{node}/{pid}' + defaults: + _content: '\Drupal\comment\Controller\CommentController::getReply' + 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 5ca7a51..a386134 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -184,6 +184,7 @@ public function getReply(NodeInterface $node, $pid, Request $request) { $op = $request->request->get('op'); $build = array(); + drupal_set_title(t('Add new comment')); // The user is previewing a comment prior to submitting it. if ($op == t('Preview')) { if (user_access('post comments')) {