RSS feeds not working
| Project: | Category |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I am having an issue with my outgoing RSS syndication. I actually was getting ready to go live and during testing I came across this problem. I kept getting 404s for most of my RSS feeds.
Here is the behavior that I have noticed...
At the "container" level the link is correct but the feed has no content when I click syndicate, only the title there is no "body" even if there is content on page. Now at the next level down which I made into categories the link is not correctly formed. The RSS link is www.example.com/"category"/node/19/feed where the actual feed looks like it should be www.example.com/node/19/feed (which in fact works when you type it in) . It is putting the "category" in the link for some reason and that doesn't even exist.
Now to really confuse things I just checked the html source and it says node/19/feed in the href for the rss link, no category.
Any Ideas?
Thanks,
Ed

#1
Update:
I took the Category pathauto out of the equation and the rss urls started to work. Still no content as there should be. As soon as I re-enabled it they broke again. Now my urls are ugly again too. I have to fix that now....
#2
I was having problems with the RSS always giving me a 404 error. So in category.module I replaced.
drupal_add_feed('node/'. $node->nid .'/feed', 'RSS - '. $node->title);with
drupal_add_feed('?q=node/'. $node->nid .'/feed', 'RSS - '. $node->title);and now it seems happy. Was that the correct way to do it, I don't know. But it now works.
#3
I encountered exactly the same problem. All my feeds were redirected to rss.xml.
The code you posted is OK, provided you don't have rewrite on. You may be better to use the url() function to generate the link.
drupal_add_feed( url("category/$rss_cids/$depth/feed", NULL, NULL, FALSE), 'RSS - '. $title);And also for the nodes themselves:
drupal_add_feed( url('node/'. $node->nid .'/feed', NULL, NULL, FALSE) , 'RSS - '. $node->title);This picks up the rewrites and if you have created aliases for them...
This solved my problems anyway.