[wp-trac] [WordPress Trac] #25639: Implement a JSON feed using rssjs.org spec
WordPress Trac
noreply at wordpress.org
Thu Nov 21 02:19:47 UTC 2013
#25639: Implement a JSON feed using rssjs.org spec
------------------------------------+-----------------------
Reporter: nacin | Owner: pento
Type: feature request | Status: assigned
Priority: normal | Milestone: 3.8
Component: Feeds | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+-----------------------
Comment (by dd32):
Since the battle has been ‘won’ here’s a full list of issues with the
implementation and RSS.JS in general that we need to address to keep this
RSS.JS Feeds:
1. Includes “docs: http://cyber.law.harvard.edu/rss/rss.html” ( RSS 0.92
includes a link to http://backend.userland.com/rss092 )
2. Includes “ttl: 15” (rss2 uses sy:updatePeriod for 1 hourly, also misses
the `rss_update_period` & `rss_update_frequency` filters)
3. Includes “language: "en-US”” (our rss2 doesn’t have a language element)
4. Uses `get_bloginfo` for the title, RSS feeds use `wp_title()`
5. Includes “generator: "WordPress 3.8-alpha-26294-src”,” instead of
“http://wordpress.org/?v=3.8-alpha-26294-src” as RSS uses
RSS.JS skips:
1. All standard feed filters are skipped (wp-includes/feed.php) (Which are
on the echo variety of functions, not the get_*() functions making it hard
to add to RSS.JS). Plus most feed-related functions have different default
filters to deal with RSS format requirements
2. Author Name
3. Categories (plus, RSS doesn’t include slugs, just the title, which
makes it hard to use for anything other than text-only display purposes)
4. Comments link & comments feed links
5. the_content filters - raw post_content is included, with unconverted
short codes, embeds, no texturize, and, \n, it may also contain sensitive
data. Most machines will want the raw data and not the_content styled data
though.
6. Enclosures - When a Audio file is attached to a post, an `<enclosure>`
is included in RSS to link to the content for parsers to read
appropriately
7. (RSS skips this too) Links to Author / Category archives
8. Excerpts - If a post includes a Excerpt RSS uses it for the
`description` field, and puts the full content in the `content` field,
RSS.JS skips the excerpt as it has no `description` vs `content` field.
9. Doesn’t respect “For each article in a feed, show: Summary” (Excerpts
only), allows content scrapers to have full post content (separate, but
related to !#5 and !#8)
10. Password Protected posts: RSS includes a “There is no excerpt because
this is a protected post.” as the `description`. plus a login form in the
`content` (Also related to !#8/!#9)
11. RSS.JS doesn’t display the entire post as it doesn’t set `$more = 1`
(will occur once !#5 is fixed)
12. i18n of errors
Obviously !#1, ,!#5, and, !#9 are the most important ones here, In the
case of !#1 it’ll require some backwards incompatible changes (or numerous
skipped filters, or output buffers). !#6 will require refactoring the
enclosure support in core to have a `get_rss_enclosure` version (which we
should have anyway)
A lot of the challenges related to permissions / formatting content / how
much (un)processed data is what WP-API has been dealing with AFAIK (aside
from appropriate format).
Due to the significant differences between RSS2.0 output and RSS.JS, I’d
also suggest dropping the “rss” namespace and “version: 2.0”, and,
“channel” fields, and simply returning the channel container as a “feed”
container.
Yes, this moves away from the RSS.JS “specification”, but since existing
parsers cannot be altered to support RSS.JS removing the extra wrappers
that serve no purpose (and contain now invalid data) seems appropriate.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25639#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list