Opened 18 years ago
Closed 18 years ago
#4550 closed defect (bug) (fixed)
Category RSS feed function broken with URL rewrites
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.2.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
If you have URL rewrite enable the get_category_rss_link
function in feed.php returns wrong feed URLs. It forgets to add a slash between the category link and the feed suffix. For example /category/mycategoryname
becomes /category/mycategorynamefeed
which is wrong.
The fix is quite simple. In feed.php change line 137 from:
$link = $link . user_trailingslashit('feed', 'feed');
to:
$link = trailingslashit($link) . user_trailingslashit('feed', 'feed');
Attachments (1)
Change History (4)
#2
@
18 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Westi, but in that case, people who DO have trailing slashes will get:
http://example.com/category/foo//feed/
If we're adding something to the end of the URL, we must use trailingslashit()
on the previous part. And then we use user_trailingslashit()
on the last part. See patch.
Note: See
TracTickets for help on using
tickets.
The fix isn't quite correct.
There are two of these issues in feed.php
In both cases a url should be built and then user_trailingslashit called.
e.g.