[wp-trac] [WordPress Trac] #14908: Incorrect top-level threading in non-singular Atom comment feed

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 20 13:32:04 UTC 2010

#14908: Incorrect top-level threading in non-singular Atom comment feed
 Reporter:  mdgl          |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Feeds         |     Version:  3.0.1          
 Severity:  normal        |    Keywords:                 
 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 :-)

Ticket URL: <http://core.trac.wordpress.org/ticket/14908>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list