diff --git a/core/modules/comment/comment.post_update.php b/core/modules/comment/comment.post_update.php index 8fc0222c8d..04bf2db28d 100644 --- a/core/modules/comment/comment.post_update.php +++ b/core/modules/comment/comment.post_update.php @@ -36,31 +36,3 @@ function comment_post_update_enable_comment_admin_view() { ->create($storage->read('views.view.comment')) ->save(); } - -/** - * Update the comment admin view. - */ -function comment_post_update_update_comment_admin_view() { - $module_handler = \Drupal::moduleHandler(); - - // Only update if the views module is enabled. - if (!$module_handler->moduleExists('views')) { - return; - } - $view_storage = \Drupal::entityTypeManager() - ->getStorage('view'); - - // Save the comment admin view to config. - $optional_install_path = $module_handler->getModule('comment')->getPath() . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY; - $storage = new FileStorage($optional_install_path); - $new_view = $view_storage - ->create($storage->read('views.view.comment')); - - if ($view = $view_storage->load('comment')) { - // If we have an existing view then update that. - $new_view - ->set('uuid', $view->uuid()) - ->enforceIsNew(FALSE); - } - $new_view->save(); -} diff --git a/core/modules/comment/src/Tests/Update/CommentAdminViewUpdateTest.php b/core/modules/comment/src/Tests/Update/CommentAdminViewUpdateTest.php index c094db47e8..87f8f23a09 100644 --- a/core/modules/comment/src/Tests/Update/CommentAdminViewUpdateTest.php +++ b/core/modules/comment/src/Tests/Update/CommentAdminViewUpdateTest.php @@ -8,7 +8,6 @@ * Tests that comment admin view is enabled after update. * * @see comment_post_update_enable_comment_admin_view() - * @see comment_post_update_update_comment_admin_view() * * @group Update */ @@ -47,13 +46,6 @@ public function testCommentAdminPostUpdateHook() { $this->drupalLogin($account); $this->drupalGet('admin/content/comment'); $this->assertText(t('No comments available.')); - - // Assert the expose filters on the admin page. - $this->assertField('subject'); - $this->assertField('combine'); - $this->assertField('comment_type'); - $this->assertField('langcode'); - } }