[wp-trac] [WordPress Trac] #23408: Link to rss-feed in default installation causes redirect loop

WordPress Trac noreply at wordpress.org
Wed Feb 6 21:20:05 UTC 2013


#23408: Link to rss-feed in default installation causes redirect loop
-----------------------------+--------------------------
 Reporter:  clusterone       |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Feeds
  Version:                   |   Severity:  major
 Keywords:                   |
-----------------------------+--------------------------
 I noticed, that google webmastertools complained about dead links in my
 blog.
 Those links were hidden in the html-code and were links to rss-feeds of
 attachments. (e.g. ?attachment_id=1647&feed=rss2)
 When i try to open the link, it returns a 301 error and if the new url is
 called, anoter 301 error is shown. After two or three times, the original
 url is shown again by a 301 error message.

 I installed two clean installations on different servers, which show the
 behaviour either. If i use the link "?attachment_id=1647&feed=rss"  the
 correct feed is loaded. (using rss instead of rss2 which is provided by
 the template)

 It seems that the error is caused by the function
 get_post_comments_feed_link(...) in "wp-include/link-template.php used wp-
 include/canonical.php.
 When i add another line to the function to return a link with
 "attachment_id=" and not "p=" or "page_id", the comment feed is loaded
 without errors.
 But the fact, that rss feeds do not cause an error and rss2 feeds create a
 loop makes me think, that another module may be defect and my workaround
 is not a solution.

 Regards

 Fabian

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


More information about the wp-trac mailing list