#12452 closed defect (bug) (fixed)
Wrong comments feed link advertised with static front page
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.2 |
Component: | Feeds | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
A static's front page's comments feed is:
example.com/page-slug/feed/
But automatic_feed_links() advertises it as:
example.com/feed/
---
Was:
---
When a static front page is configured (e.g. for a CMS site), the wrong feed links are advertised since the URL for the "page comments" feed conflicts with the default feed URL.
Consider the following configuration:
Front page: "Home" (http://www.site.com/)
Blog home: "Blog" (http://www.site.com/blog)
Permalinks: "/blog/%year%/%monthnum%/%postname%/"
By default (core, no theme), the front page then advertises a "Home Comments Feed" for the URL "http://www.site.com/feed/" but in fact this returns the feed for the site blog (default feed), not the comments on the "Home" page as stated. No feed is advertised from the blog home page at all.
Enabling the extra feed links using "automatic_feed_links()" in the theme (as happens with Kubrick, for example) causes two additional feeds to be advertised from *every* page of the site (for site blog and comments). The front page then advertises three feed links "Feed", "Comments Feed" and "Home Comments Feed" which return the site blog, site comments and (duplicate/incorrect) site blog feeds respectively.
I believe the following behaviour should be observed:
a) Default feeds should move to wherever the blog home is set (e.g. http://www.site.com/blog/feed, http://www.site.com/blog/comments/feed).
b) Automatic links to the site blog and site comments should *not* be added to every page, because these are not really "alternate" versions of the page being viewed as the link headers so claim (we should preserve the semantics of HTML where possible). Agreed the core does not do this, but the default theme Kubrick does.
c) Ideally, feeds for the whole site should be distinguished from those for the blog (i.e. not including changes and comments to pages in the blog feed), but that is probably a rather larger issue!
Change History (6)
#3
@
15 years ago
I still think my first point is a bug. Comments for the front page are, indeed available at "/page-slug/feed", but this is not how they are advertised! Don't forget that the permalink for the front page is reset to "/", so the page slug is temporarily hidden.
In the configuration described above, the following is the RSS link advertised on the front page (core only, no theme):
<link rel="alternate" type="application/rss+xml" title="Blog Name » Home Comments Feed" href="http://www.site.com/feed/" />
This says it is the "Home Comments Feed", but in fact it returns the blog entry feed. This looks like a bug to me - if nothing else the poor user is going to be very confused!
If you enable "automatic_feed_links()" in the theme, then you get the following three feed links advertised:
<link rel="alternate" type="application/rss+xml" title="Blog Name » Feed" href="http://www.site.com/feed/" /> <link rel="alternate" type="application/rss+xml" title="Blog Name » Comments Feed" href="http://www.site.com/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="Blog Name » Home Comments Feed" href="http://www.site.com/feed/" />
Now we have two feeds with different names but the same address, leading to even more confusion. And none of these feeds returns anything to do with the information displayed on the page, despite them being declared "alternate" versions!
I would agree, however that my other points (a), (b), (c) could be considered enhancement requests, although they would (IMHO) make the treatment of feeds much more sensible and consistent.
#4
@
15 years ago
- Description modified (diff)
- Keywords needs-patch added; 2nd-opinion removed
- Milestone changed from Future Release to 3.0
- Summary changed from Wrong feed links advertised with static front page to Wrong comments feed link advertised with static front page
- Type changed from enhancement to defect (bug)
oh, ok. that makes more sense. changing the ticket's title and amending the description slightly, then.
#6
@
15 years ago
Result after:
<link rel="alternate" type="application/rss+xml" title="localhost://commit/ » Feed" href="http://localhost/wordpress-commit/feed/" /> <link rel="alternate" type="application/rss+xml" title="localhost://commit/ » Comments Feed" href="http://localhost/wordpress-commit/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="localhost://commit/ » Frontpage Comments Feed" href="http://localhost/wordpress-commit/frontpage/feed/" />
marking this as an enhancement, because to me the feeds are working as expected. I actually like it that it's /feed/ for the blog and that the comments on the front page are, best I'm aware, at /page-slug/feed/.