Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#35279 closed defect (bug) (fixed)

Comments list table "Submitted On" date links only resolve for approved & unorphaned comments

Reported by: rachelbaker's profile rachelbaker Owned by: rachelbaker's profile rachelbaker
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: administration Cc:


In the "Submitted On" column in the Comments List Table we always wrap the comment date in an anchor tag with an href that goes to get_comment_link(). We should only wrap comments that have been approved & have a valid comment_post_ID in this anchor tag.

When moderators click the date link in the "Submitted On" column for:

  • pending, spammed, or trashed comments that are attached to a post they are sent to the comment template of the post where the unapproved comment was submitted, but do not see the relevant comment (because it is not approved).
  • any comment (approved or not) that is orphaned (not attached to a valid post), they are sent to the homepage (with a url because comments don't have "real" permalinks. Related #34106

I believe expected behavior would be to only wrap comment dates in anchor tags when we can generate a valid url.

Attachments (2)

trashed-comment-with-submittedon-link.png (141.0 KB) - added by rachelbaker 9 years ago.
Unapproved comments with anchor tag on comment date
35279.diff (1.1 KB) - added by rachelbaker 9 years ago.

Download all attachments as: .zip

Change History (5)

9 years ago

Unapproved comments with anchor tag on comment date

9 years ago

#1 @rachelbaker
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.5

After 35179.diff the Submitted On column is not wrapped in an anchor tag if the comment is not approved or the comment_post_ID is empty.

See screenshot:

#2 @rachelbaker
8 years ago

  • Owner set to rachelbaker
  • Resolution set to fixed
  • Status changed from new to closed

In 36521:

Comments: In the comments list table, only link rows inside the “Submitted On” column to the comment if it is publicly viewable.

The date within the comments list table “Submitted On” column will only be wrapped in get_comment_link() if the comment is approved and associated with a valid comment_post_ID.

Fixes #35279.

#3 @ocean90
8 years ago

Follow-up: #36742

Note: See TracTickets for help on using tickets.