Opened 15 years ago
Closed 14 years ago
#14908 closed defect (bug) (fixed)
Incorrect top-level threading in non-singular Atom comment feed
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.0.1 |
Component: | Feeds | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
In non-singular Atom comment feeds (i.e. those for archives, search and home), incorrect threading information is provided for top-level comments (i.e. comments that refer directly to a post/page, not ones made in reply to another comment).
Instead of the correct and specific parent post in each case, the threading information for such comments always refers to the same single (random) post from the feed.
To reproduce the bug, create several new top-level comments on distinct posts and then view the generated XML for the Atom comments feed on your blog home page, inspecting the "<thr:in-reply-to>" elements as defined by RFC 4685.
The erroneous code seems to be in file "feed-atom-comments.php" at line 76 (at WP 3.0.1), where the parent link is output using "the_guid()" and "the_permalink_rss()". I think these functions need to refer to the correct and specific parent post using the variable "$comment_post". See the related code outputting the "<title>" element earlier in this file.
Also in this file at line 46 is what appears to be a redundant call to "get_post_custom" where the output is simply thrown away [this is also in file "feed-rss-comments.php" line 66]. Perhaps this was part of some earlier attempt to get the appropriate global variables updated, but in any case it doesn't work and seems completely unnecessary!
I'm surprised this threading issue hasn't been noticed before. It looks like nobody uses this stuff :-)
Attachments (3)
Change History (9)
#1
@
14 years ago
- Keywords has-patch added
Wow, I'm surprised too! I guess most people stick with RSS.
#2
@
14 years ago
- Keywords 3.2-early added
- Milestone changed from Awaiting Review to Future Release
Nice catch.
#3
@
14 years ago
This is a really simple fix for an issue that has been open for a year, would be nice to see it in 3.3?
#4
@
14 years ago
- Keywords needs-testing added; 3.2-early removed
- Milestone changed from Future Release to 3.3
- Owner set to westi
- Status changed from new to accepted
#5
@
14 years ago
14908.2.patch also removes redundant calls to get_post_custom()
.
Ensure post global is set in feed-atom-comments.php