Opened 16 years ago
Closed 16 years ago
#5435 closed defect (bug) (fixed)
Incorrect id, self link and alternate link in the Atom comment feed of each entry
Reported by: | peaceablewhale | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | Atom, Comment Feed, has-patch |
Focuses: | Cc: |
Description
The id, self link and alternate link in the Atom comment feed of each entry is incorrect. Using an entry of the WordPress development blog, http://wordpress.org/development/2007/10/wordpress-231/feed/atom/, as an example:
The following code is not correct...
<id>http://wordpress.org/development/comments/feed/atom/</id> <link rel="self" type="application/atom+xml" href="http://wordpress.org/development/comments/feed/atom/" /> <link rel="alternate" type="text/html" href="http://wordpress.org/development" />
The correct code should be...
<id>http://wordpress.org/development/2007/10/wordpress-231/feed/atom/</id> <link rel="self" type="application/atom+xml" href="http://wordpress.org/development/2007/10/wordpress-231/feed/atom/" /> <link rel="alternate" type="text/html" href="http://wordpress.org/development/2007/10/wordpress-231/#comments" />
Does anybody know how to correct them?
Attachments (1)
Change History (6)
#1
follow-up:
↓ 2
@
16 years ago
- Keywords has-patch added
- Owner changed from anonymous to ionfish
- Severity changed from major to normal
- Status changed from new to assigned
#3
@
16 years ago
- Owner changed from ionfish to ryan
- Status changed from assigned to new
Not all templates have an element with the id 'comments', but I imagine the developer who commits the fix will add it (or mention it here) if they feel it's appropriate (I suppose it would be in line with the behaviour of some other links functions).
Ideally we'd also include self and alternate links and id values for searches as well, rather than simply using the root values, but that was beyond the scope of the five minutes I had to write this in. We probably need a search_feed_link() function (a noticeable omission from r6365); I might make a new ticket and set about writing one.
Replying to ionfish:
Thanks for the fix. I have a comment on it:
the_permalink(); returns the permalink of the entry only. Should the alternate link refer to the comment part of the entry by adding "#comments" after the permalink?