diff --git a/core/modules/comment/config/views.view.comments_recent.yml b/core/modules/comment/config/views.view.comments_recent.yml index 5aa906d..11431fd 100644 --- a/core/modules/comment/config/views.view.comments_recent.yml +++ b/core/modules/comment/config/views.view.comments_recent.yml @@ -184,10 +184,10 @@ display: operator: false group: 1 sorts: - created: - id: created + cid: + id: cid table: comment - field: created + field: cid relationship: none group_type: group admin_label: '' diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php index f74a68c..d581afb 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php @@ -87,8 +87,6 @@ public function setUp() { 'entity_id' => $this->node->id(), )); $comment->uid->target_id = 0; - // Stagger the comments so the timestamp sorting works. - $comment->created->value = REQUEST_TIME - $i; $comment->subject->value = 'Test comment ' . $i; $comment->comment_body->value = 'Test body ' . $i; $comment->comment_body->format = 'full_html'; @@ -105,7 +103,7 @@ public function setUp() { $this->commentsCreated = entity_load_multiple('comment'); // Sort created comments in ascending order. - ksort($this->commentsCreated, SORT_NUMERIC); + krsort($this->commentsCreated, SORT_NUMERIC); } /**