Incorrect top-level threading in non-singular Atom comment feed
|Reported by:||mdgl||Owned by:||westi|
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 :-)
Change History (9)
comment:2 markjaquith — 3 years ago
- Keywords 3.2-early added
- Milestone changed from Awaiting Review to Future Release
- 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