Make WordPress Core

Opened 15 years ago

Last modified 3 months ago

#9611 new enhancement

Make comment feeds fail with an error code when comments are closed

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Feeds Keywords: has-patch dev-feedback
Focuses: Cc:

Description

This is mostly a suggestion as an enhancement.

When you close a post's comments and pings, it should no longer output an rss feed. Instead, it should return a not found (404) or gone (410) error and die.

Likewise, if all posts and pages on a site disallow comments and pings, the comments feeds should not be broadcast, and should return the same error code.

Thoughts?

Attachments (1)

9611.diff (1.6 KB) - added by solarissmoke 14 years ago.

Download all attachments as: .zip

Change History (14)

#1 @Denis-de-Bernardy
15 years ago

was meaning: the comment feeds should not be advertised.

#2 @peaceablewhale
15 years ago

Does returning a feed entry saying "Comment was disabled" more reasonable? Current subscribers of the comments feed will see that message too.

#3 @peaceablewhale
15 years ago

*Does --> Is

#4 @Denis-de-Bernardy
15 years ago

might work too, but it should ideally return an error code alongside. that way, if a search engine is pulling the feed with any regularity, it'll stop hammering the server.

#5 @peaceablewhale
15 years ago

410 Gone should not be used since feed readers will stop updating the feed after receiving 410 and we don't know if comment is disabled permanently. 404 Not Found is a choice but I am afraid that current subscribers may not know what has happened to the feed.

#6 follow-up: @Denis-de-Bernardy
15 years ago

Personally, 410 is exactly what I'd want it to be on my own site: Something that stops the feed reader at the gate on comments feeds for old posts, where the comments are closed.

It's annoying to have feed readers who are knocking your site's individual posts and pages' feeds when comments are closed. It's just a waste of bandwidth... :-)

#7 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; 2nd-opinion removed
  • Milestone changed from 2.9 to Future Release

#8 in reply to: ↑ 6 @solarissmoke
14 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

Replying to Denis-de-Bernardy:

It's annoying to have feed readers who are knocking your site's individual posts and pages' feeds when comments are closed. It's just a waste of bandwidth... :-)

I agree! Here is a patch to (a) stop advertising the comment feed and (b) 410 the feed when comments are closed.

However, I feel like not everyone will be happy to implement this...

@solarissmoke
14 years ago

#9 @SergeyBiryukov
11 years ago

#22028 was marked as a duplicate.

#11 @chriscct7
9 years ago

  • Severity changed from minor to normal

This ticket was mentioned in PR #6937 on WordPress/wordpress-develop by @tw2113.


3 months ago
#12

This code change updates original changes from the trac ticket below, to match the current code from WordPress Trunk. Everything should match what the original patch submitter added, with the exception of not re-applying changes to the wp-includes/general-template.php file because the same change has since been implemented in the 13 years between patches.

Trac ticket: See https://core.trac.wordpress.org/ticket/9611

#13 @tw2113
3 months ago

Only part of the original patch needed to be re-applied for the current codebase.

Note: See TracTickets for help on using tickets.