Pager pagination breaks when deleting content on Comment Bulk Operation

Created on 24 May 2021, over 3 years ago
Updated 24 January 2025, 12 days ago

Problem/Motivation

I am doing bulk updates for comments list with pagination.
I have a view to display list of unpublished comments with pagination.
I am displaying 10 comments and operation is to publish the comments.
Suppose there are 12 unpublished comments.
I am on page 2 and select all comments(2 on second page) to publish. Once the operation is performed, it stays on page 2 with message, "No comments found".
In actual, there are 10 comments present on page 1.
In this case, it should be redirected to page 1 but it is staying on page 2.

Drupal version : 8.9.14
PHP Version: 7.4.15

Steps to reproduce

Steps to Reproduce the Issue:
1. Install Drupal
2. log in as an admin
3. Go to "admin/structure/views/view/content"
4. And update the "items per page" to 4 from the Pager option.
5. Now create 10+ dummy content.
6. Go to the "/admin/content" page.
7. Go to last page of the content list.
8. Select all the content and delete them.
9. Verify the page number. The page number is updating to 2, but no content is displayed, while we have content on that page.
(This is the issue that we fix in this ticket).

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

comment.module

Created by

🇮🇳India mahesh.umarane

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024