WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#9776 closed defect (bug) (worksforme)

Posts with auto-closed comments display link in frontpage instead of "Comments Off"

Reported by: dangelog Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.7.1
Component: Comments Keywords:
Focuses: Cc:

Description

I have enabled the "Automatically close comments" feature.

Posts with no comments that were auto-closed still have the "No Comments" link displayed in the frontpage, instead of the correct one, "Comments Off". However, if you follow one link (i.e., display the post page), the comments for the post are actually closed.

I believe that comments_popup_link should be somehow fixed. I think it uses the admin panel value for the post, which is, even for "expired" posts, "allow commments". Instead, it should consider the auto-close setting as well and return "Comments Off" even if comments are enabled but were automatically closed.

PS: it would be very helpful if the auto-close feature gets some better explanations about how it works. For instance: why "expired" posts still have the "Allow comments" flag enabled?

Change History (5)

comment:1 @Denis-de-Bernardy6 years ago

  • Milestone changed from Unassigned to Future Release

comment:2 @Denis-de-Bernardy6 years ago

  • Component changed from General to Administration
  • Severity changed from normal to minor

comment:3 @Denis-de-Bernardy6 years ago

  • Component changed from Administration to Comments
  • Milestone changed from Future Release to 2.9

comment:4 @azaozz6 years ago

  • Milestone changed from 2.9 to 3.0

No patch.

comment:5 @westi5 years ago

  • Milestone 3.0 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Testing in 2.9 with the default theme.

Went to admin and enabled "Automatically close comments" and set to 1 day.

All posts older than 1 day with no comments now show "Comments off" on the blog front end.

This sounds like a theme issue - The default theme uses:

<?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>

Closing as works for me.

Note: See TracTickets for help on using tickets.