#20937 closed defect (bug) (fixed)
Comments don't show in non-post edit screen meta box
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.4.1 | Priority: | normal |
| Severity: | normal | Version: | 3.4 |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Add some comments to a page and enable the Comments meta box on the page edit screen.
Expected: List of comments shown in the meta box.
Actual: No comments list. Just the "Add Comment" button.
This happens for all non-post content types.
In 3.3 the comments were not listed either, but a "Show Comments" link was available to fetch the list. Its disappearance was caused by [20164] which set the "Show Comments" link to always have the .hidden class. The removal of this link also means that a page refresh is required when enabling the meta box for the first time instead of being able to load the comments with a click.
It's possible to get the comments list to be displayed by enabling the comments meta box on the Post screen too. The fix for this is to use get_current_screen() in post_comment_meta_box() instead of just 'post'.
Original report: http://wordpress.org/support/topic/comments-not-showing-on-edit-post-page
Attachments (3)
Change History (9)
#2
@
13 years ago
- Milestone changed from Awaiting Review to 3.4.1
Seems minor, since the comments list was never shown here. Can wait for 3.4.1.
#3
@
13 years ago
- Owner set to duck_
- Status changed from new to assigned
duck_ is going to shrink this patch a bit (no need for $total to move). It is also possible that for trunk, we can convert this to get_comments(), which accepts a 'count' arg.
#4
@
13 years ago
- Keywords commit added
20937.2.diff for the 3.4 branch.
20937.trunk.diff for trunk switches the SQL query to use get_comments().
20937.diff also moves the "Show Comments" link into the else branch so that it and "No comments yet" are not shown at the same time. If they are and a comment is added then clicking "Show Comments" does not remove the no comments message. This is the same as 3.3 behaviour which bailed early if $total <= 1.