[wp-trac] [WordPress Trac] #4637: get_post_comments_feed_link() does not work on Pages with default permalinks

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 14 16:37:06 GMT 2007


#4637: get_post_comments_feed_link() does not work on Pages with default
permalinks
---------------------+------------------------------------------------------
 Reporter:  Otto42   |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:           
Component:  General  |     Version:  2.3      
 Severity:  major    |    Keywords:           
---------------------+------------------------------------------------------
 When you use the classic template, or any template that calls the
 comments_rss_link function on Pages, the resulting link is incorrect if
 you are using default permalinks.

 In get_post_comments_feed_link() there's this code:
 {{{
 if ( '' != get_option('permalink_structure') ) {
 ...
 } else {
         $url = get_option('home') . "/?feed=$feed&p=$id";
 }
 }}}

 The "p=$id" is incorrect for Pages, that needs to be "page_id=$id". The
 link using p= results in a 404 page from Wordpress, since it's specifying
 a Post which does not exist (it's a Page).

 Possible solutions:
  * Fix the get_post_comments_feed_link() to work for pages too.
  * Change the query mechanism to allow p=ID to pull up pages as well.

 Reproduction:
  * Create a new clean Wordpress blog, switch to the classic template.
  * Make a Page.
  * Try the RSS link at the bottom of that Page.

 Problem exists in 2.2.1 and trunk.

 Support thread reference:
 http://wordpress.org/support/topic/125956

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


More information about the wp-trac mailing list