diff --git a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php index bb65e87..1061059 100644 --- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php +++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php @@ -199,17 +199,15 @@ public function buildForm(array $form, array &$form_state, $type = 'new') { if (!empty($comment->comment_body->value)) { $body = $comment->comment_body->value; } - // @todo use $comment->uri() when https://drupal.org/node/2010202 is - // fixed. - $comment_uri = comment_uri($comment); + $comment_permalink = $comment->permalink(); $options[$comment->id()] = array( 'title' => array('data' => array('#title' => $comment->subject->value ?: $comment->id())), 'subject' => array( 'data' => array( '#type' => 'link', '#title' => $comment->subject->value, - '#href' => $comment_uri['path'], - '#options' => $comment_uri['options'] + array( + '#href' => $comment_permalink['path'], + '#options' => $comment_permalink['options'] + array( 'attributes' => array( 'title' => Unicode::truncate($body, 128), ), @@ -228,6 +226,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') { ), 'changed' => $this->date->format($comment->changed->value, 'short'), ); + $comment_uri = $comment->uri(); $links = array(); $links['edit'] = array( 'title' => $this->t('edit'),