Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20937 closed defect (bug) (fixed)

Comments don't show in non-post edit screen meta box

Reported by: duck_'s profile duck_ Owned by: duck_'s profile duck_
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)

20937.diff (1.9 KB) - added by duck_ 13 years ago.
20937.2.diff (1.3 KB) - added by duck_ 13 years ago.
20937.trunk.diff (1.8 KB) - added by duck_ 13 years ago.

Download all attachments as: .zip

Change History (9)

@duck_
13 years ago

#1 @duck_
13 years ago

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.

#2 @markjaquith
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 @nacin
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.

@duck_
13 years ago

@duck_
13 years ago

#4 @duck_
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().

#5 @markjaquith
13 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In [21107]:

Properly show comments on Page edit screen. props duck_. fixes #20937 for trunk

#6 @markjaquith
13 years ago

In [21108]:

Properly show comments on Page edit screen. props duck_. fixes #20937 for 3.4 branch.

Note: See TracTickets for help on using tickets.