Make WordPress Core

Opened 13 years ago

Closed 11 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:


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 13 years ago.
Adds slash:comments to rss2 feed
slash-comments-fix.diff (796 bytes) - added by Otto42 13 years ago.
Fixed version using get_comments_number();
4023.patch (700 bytes) - added by peaceablewhale 11 years ago.
Patch for trunk

Download all attachments as: .zip

Change History (26)

13 years ago

Adds slash:comments to rss2 feed

#1 @Otto42
13 years ago

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

13 years ago

Fixed version using get_comments_number();

#2 @rob1n
13 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...

#3 @rob1n
13 years ago

  • Milestone changed from 2.1.3 to 2.2

#4 @rob1n
13 years ago

  • Milestone changed from 2.2 to 2.3

#5 @rob1n
13 years ago

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

#6 @Otto42
13 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.

#7 @Otto42
13 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.

#8 @rob1n
13 years ago

  • Owner changed from anonymous to rob1n

#9 @rob1n
13 years ago

  • Keywords dev-feedback removed

#10 @rob1n
13 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.


#11 @peaceablewhale
11 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.

#12 @Denis-de-Bernardy
11 years ago

  • Milestone set to Future Release

#13 @Denis-de-Bernardy
11 years ago

  • Keywords needs-patch added; has-patch removed

11 years ago

Patch for trunk

#14 @peaceablewhale
11 years ago

  • Keywords has-patch added; needs-patch removed

New patch attached.

#15 @Denis-de-Bernardy
11 years ago

  • Keywords commit added

#16 @Denis-de-Bernardy
11 years ago

  • Keywords 2nd-opinion commit removed

shouldn't this get added to the other feeds?

#17 @peaceablewhale
11 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.

#18 follow-up: @Denis-de-Bernardy
11 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.

#19 @peaceablewhale
11 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)

#20 in reply to: ↑ 18 @Otto42
11 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.

#21 @Denis-de-Bernardy
11 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.

#22 @westi
11 years ago

Looks good to me.

Now we have lastBuildDate this seems safe to add

#23 @westi
11 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.