WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#4023 closed enhancement (fixed)

Add slash:comments to RSS2 feed

Reported by: Otto42 Owned by: rob1n
Milestone: 2.8 Priority: low
Severity: minor Version: 2.8
Component: Feeds Keywords: has-patch tested commit dev-feedback
Focuses: Cc:

Description

The slash:comments extension to RSS2 basically puts the number of comments available into the feed directly. This can allow some feedreaders the ability to display the comments in the reader itself. Plus it really doesn't hurt anything to have it there.

Patch attached.

Attachments (3)

slash-comments.diff (806 bytes) - added by Otto42 7 years ago.
Adds slash:comments to rss2 feed
slash-comments-fix.diff (796 bytes) - added by Otto42 7 years ago.
Fixed version using get_comments_number();
4023.patch (700 bytes) - added by peaceablewhale 5 years ago.
Patch for trunk

Download all attachments as: .zip

Change History (26)

Otto427 years ago

Adds slash:comments to rss2 feed

comment:1 Otto427 years ago

Correction to previous patch: Use get_comments_number() to retrieve the number of comments. This actually works. :)

Otto427 years ago

Fixed version using get_comments_number();

comment:2 rob1n7 years ago

  • Keywords dev-feedback 2nd-opinion added

I like it, but do you have any statistics on who actually *looks* at slash namespace stuff? For example, do Bloglines, Google Reader, etc look at it?

It seems if it's not popular, then it might as well go into a plugin...

comment:3 rob1n7 years ago

  • Milestone changed from 2.1.3 to 2.2

comment:4 rob1n7 years ago

  • Milestone changed from 2.2 to 2.3

comment:5 rob1n7 years ago

After a bit of research, +1 for plugin and leaving it out of the core.

comment:6 Otto427 years ago

The only readers that use the slash namespace are readers that run on the desktop, as far as I know. They're often the only ones that display comments on an item to the user.

The slash namespace only has the one possible element, which gives the number of comments. It's limited in scope, but still useful information for these readers. At least a few of them cannot properly display comments from the comments feeds without knowing the number of comments in advance. Therefore it's useful to have.

While it could be in a plugin, it makes more sense in the core. I've been using it for a while and every reader I've tried handles it perfectly well. It passes through feedburner just fine. There's no real compatibility issues with it and modern feedreaders.

comment:7 Otto427 years ago

Also, for what it's worth, FeedValidator is aware of the slash namespace and will complain if it contains non-numeric data and so forth. It considers it to be a "normal" extension.

comment:8 rob1n7 years ago

  • Owner changed from anonymous to rob1n

comment:9 rob1n7 years ago

  • Keywords dev-feedback removed

comment:10 rob1n7 years ago

  • Milestone 2.3 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Talked to Ryan, he says he doesn't think it really warrants being in the core. I agree, but I whipped up a plugin (URL at end of this post) in case someone wants to use this.

http://shorty114.net/2007/04/slashcomments-plugin

comment:11 peaceablewhale5 years ago

  • Component changed from Optimization to Feeds
  • Keywords dev-feedback added
  • Resolution wontfix deleted
  • Severity changed from trivial to minor
  • Status changed from closed to reopened
  • Version changed from 2.1.2 to 2.8

I think the decision made 2 years ago should be reviewed now. slash:comments has been reviewed by the RSS Advisory Board and documented on the RSS Best Practices Profile: http://www.rssboard.org/rss-profile#namespace-elements-slash-comments. In addition, the WordPress Atom feed provides the comment number via the thr:total element yet the RSS 2 feed does not have the same information provided.

comment:12 Denis-de-Bernardy5 years ago

  • Milestone set to Future Release

comment:13 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch removed

peaceablewhale5 years ago

Patch for trunk

comment:14 peaceablewhale5 years ago

  • Keywords has-patch added; needs-patch removed

New patch attached.

comment:15 Denis-de-Bernardy5 years ago

  • Keywords commit added

comment:16 Denis-de-Bernardy5 years ago

  • Keywords 2nd-opinion commit removed

shouldn't this get added to the other feeds?

comment:17 peaceablewhale5 years ago

The Atom Threading Extension has been supplying comment number in the WordPress Atom feeds while the RSS 1 feeds do not have comment information. As a result, only RSS 2 feeds need this fix.

comment:18 follow-up: Denis-de-Bernardy5 years ago

  • Keywords changed from has-patch dev-feedback to has-patch dev-feedback
  • Milestone changed from Future Release to 2.8

it's easily left to a plugin imo.

comment:19 peaceablewhale5 years ago

Not many users are aware of such a plugin I think. They will only notice that WordPress does not provide comment number information in the feed. (Especially because the RSS 2 is the default feed)

comment:20 in reply to: ↑ 18 Otto425 years ago

Replying to Denis-de-Bernardy:

it's easily left to a plugin imo.

The same information is already in the ATOM feed, and it's considered a best practice for RSS feeds. It's an extremely minor feature that should not need a plugin for it.

comment:21 Denis-de-Bernardy5 years ago

  • Keywords tested commit added

let's see if this gets in, then... there are just too many tickets around, and I feel like closing a hundred more.

comment:22 westi5 years ago

Looks good to me.

Now we have lastBuildDate this seems safe to add

comment:23 westi5 years ago

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

(In [11272]) Add slash:comments extension to RSS2 feed to give comment counts for posts. Fixes #4023 props peaceablewhale.

Note: See TracTickets for help on using tickets.