diff --git a/core/modules/comment/src/Form/CommentAdminOverview.php b/core/modules/comment/src/Form/CommentAdminOverview.php index 5ed6cfe..79b25dd 100644 --- a/core/modules/comment/src/Form/CommentAdminOverview.php +++ b/core/modules/comment/src/Form/CommentAdminOverview.php @@ -286,9 +286,15 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $form_state->setRedirect('comment.admin'); } else { + $info = []; + /** @var \Drupal\comment\CommentInterface $comment */ + foreach ($comments as $comment) { + $langcode = $comment->language()->getId(); + $info[$comment->id()][$langcode] = $langcode; + } $this->tempStoreFactory ->get('comment_multiple_delete_confirm') - ->set($this->currentUser()->id(), $comments); + ->set($this->currentUser()->id(), $info); $form_state->setRedirect('comment.multiple_delete_confirm'); } } diff --git a/core/modules/comment/src/Tests/CommentAdminTest.php b/core/modules/comment/src/Tests/CommentAdminTest.php index fa82bfa..5b9e258 100644 --- a/core/modules/comment/src/Tests/CommentAdminTest.php +++ b/core/modules/comment/src/Tests/CommentAdminTest.php @@ -95,7 +95,7 @@ function testApprovalAdminInterface() { ); $this->drupalPostForm(NULL, $edit, t('Update')); $this->assertText(t('Are you sure you want to delete these comments and all their children?'), 'Confirmation required.'); - $this->drupalPostForm(NULL, $edit, t('Delete')); + $this->drupalPostForm(NULL, [], t('Delete')); $this->assertText(t('No comments available.'), 'All comments were deleted.'); // Test message when no comments selected. $edit = array(