Opened 19 years ago
Closed 19 years ago
#4550 closed defect (bug) (fixed)
Category RSS feed function broken with URL rewrites
| Reported by: | gwagenknecht | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | 2.2.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
19 years ago
- Owner changed from to
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.