Forum feeds not redirecting
starkos - October 26, 2007 - 16:39
| Project: | FeedBurner |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
I've gotten my main site feed burned (thanks for the module!) and working nicely. I am trying to now burn my forum feeds and I can't for the life of me get them working. Do I have to do anything special for taxonomy feeds?
Pathauto has named the feeds like so: forums/help-0/feed, as an alias for taxonomy/term/3/0/feed. Clicking on the link brings up the raw Drupal feed, instead of the burned version. My redirect in the Feedburner module looks correct: forums/help-0/feed -> feeds.feedburner.com/premake-help. Everything looks right from the FeedBurner side too.
Any ideas appreciated, I'm stumped!

#1
I'm trying to work through this, here is what I've found so far: on line 549, you do:
$path = $_GET['q'];if (isset($feeds[$path])) {
$path is getting set to the un-aliased URL "taxonomy/terms/14/0/feed" but you are expecting the alias "forums/help/feed". I don't know enough about Drupal to know why this is happening. I'll keep digging, but hopefully someone who knows more can help out.
#2
I should have waited to post; I think I've fixed it. On line 549, change:
$path = $_GET['q'];
To this:
$path = drupal_get_path_alias($_GET['q']);
The problem is that $_GET['q'] is returning the "normal" path, but you've stored the aliased path, so you need to convert between the two. I tried this on both aliased and unaliased paths and it seems to work in both cases.
#3
I think I've already fixed this locally because I was testing redirecting during anonymous caching. What I found was that if Drupal doesn't have a cached version of the feed to serve from the database, it has to load the correct 'normal path'. When processing gets to the FeedBurner module it already has the correct path. However, when the cached version is served from the database, it skips a lot of things it doesn't have to do, including 'normal path' loading. When processing gets to the module, it has an un-normal path (aliased), which isn't what's stored in the database for FeedBurner redirects. The module should have stored "taxonomy/terms/14/0/feed" for the redirects url, so I'm going to check that it is storing this correctly.
How I've fixed it on my local copy is not allowing Drupal to cache feeds which have associated FeedBurner redirects. Drupal will always load the normal path information which will be available to the module. I'll keep you posted.
#4
I think I can say I've actually fixed this on my development version and I can also mark this as a duplicate of #167735: Errors with (normal) cache enabled.