Opened 18 years ago
Closed 18 years ago
#4637 closed defect (bug) (fixed)
get_post_comments_feed_link() does not work on Pages with default permalinks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | major | Version: | 2.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
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
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [5919]) Fix get_post_comments_feed_link() to work with pages. fixes #4637