Opened 5 years ago
Last modified 4 months ago
#53310 new defect (bug)
All Comments are not visible in comment section in WordPress Backend Post Section
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 5.7.2 |
| Component: | Comments | Keywords: | has-patch |
| Focuses: | Cc: |
Description
All Comments are not visible in comment section in WordPress Back-end Post Section
-
Ex : 1. If I have 104 Comment in My Post then I am able to see only latest 100 comment
- If I have 21 Comment in Post then I am able to see only 20 comments
Reference Video Link: https://www.loom.com/share/45c015457f81401ea4cabbb562c5ef34
Note : This issue occurs in Backend post section
Attachments (1)
Change History (8)
#2
in reply to:
↑ 1
@
5 years ago
Replying to SergeyBiryukov:
Hi there, welcome to WordPress Trac! Thanks for the report.
Looking at the video, you have 21 comments displayed on the Comments screen in descending order, with comments 21 to 2 displayed on the first page, and comment 1 displayed on the second page, as per the "Number of items per page" setting on the Screen Options tab in the top right of the screen.
This seems to work as expected, could you clarify what is the issue being reported here?
it's Not Working I have checked in Post Section (Post Have 21 comments but visible only 20)
Note: Not talking about pagination , talking about post details Comment Section(Backend)
Reference Link : https://www.loom.com/share/197316843a254707b7a4bafc15045a47
#3
@
4 years ago
it's Not Working I have checked in Post Section (Post Have 21 comments but visible only 20)
Note: Not talking about pagination , talking about post details Comment Section(Backend)
Reference Link : https://www.loom.com/share/197316843a254707b7a4bafc15045a47
#4
@
6 months ago
- Keywords needs-patch added; reporter-feedback removed
I've confirmed this is still a bug. It appears to be a javascript issue that causes the "Show more comments" link to be rendered with style="display: none;" after loading comments.
If you use your dev tools console to remove the display attribute, the link shows and it will function as expected.
This appears to be an issue only with the Classic Editor, since the comments list isn't shown on the post edit screen when using the block editor.
This ticket was mentioned in PR #9370 on WordPress/wordpress-develop by @akshat2802.
5 months ago
#5
- Keywords has-patch added; needs-patch removed
This ticket was mentioned in PR #9369 on WordPress/wordpress-develop by @akshat2802.
5 months ago
#6
#7
@
4 months ago
The issue occurs because:
1] On initial page load, prepare_items() respects the user's screen option (e.g., 10 comments per page).
2] However, subsequent AJAX calls default to loading 20 comments (num), which causes inconsistent loading behaviour, e.g., 10 on first load, 20 on second.
3] This results in broken pagination logic:
- The start offset increases faster than expected.
- When start >= total, the "Show more comments" button disappears prematurely, even though not all comments have been shown (some are still stored in extras and never rendered).
Bug Reference:
- https://github.com/WordPress/wordpress-develop/blob/f8e846bd62b63c44064ce5a28b1bb620245241f9/src/js/_enqueues/admin/post.js#L44
- https://github.com/WordPress/wordpress-develop/blob/f8e846bd62b63c44064ce5a28b1bb620245241f9/src/wp-admin/includes/meta-boxes.php#L917
- https://github.com/WordPress/wordpress-develop/blob/f8e846bd62b63c44064ce5a28b1bb620245241f9/src/wp-admin/includes/class-wp-comments-list-table.php#L167C3-L169C71
PR 1: https://github.com/WordPress/wordpress-develop/pull/9369
- Changes the default num value from 20 to 10, to align with the initial load (or default screen option).
PR 2: https://github.com/WordPress/wordpress-develop/pull/9370
- Dynamically retrieves the user's screen option (per_page) and stores it in commentsBox.num.
- All AJAX requests reuse this value, ensuring consistency across loads and preventing pagination mismatches.
Hi there, welcome to WordPress Trac! Thanks for the report.
Looking at the video, you have 21 comments displayed on the Comments screen in descending order, with comments 21 to 2 displayed on the first page, and comment 1 displayed on the second page, as per the "Number of items per page" setting on the Screen Options tab in the top right of the screen.
This seems to work as expected, could you clarify what is the issue being reported here?