In the feeds Drupal normally generates, the <link> element points to the page where more information on the feed can be found, and not the feed itself. When Views RSS generates a feed for a view, the <link> element points to the generated feed instead of the view itself -- this is contrary to how other feeds are being generated.
On line views_rss.module:97, I added the following to take care if this problem:
$view->real_url = preg_replace( '/\/feed$/', '', $view->real_url);
This gets rid of the trailing /feed when the
element is generated, pointing the feed to the view rather than the view's feed. If this approach isn't desirable, it would be nice if the Views RSS feed at least pointed to the view and not the view's feed.
Thanks!
Comments
Comment #1
merlinofchaos commentedOh geez, I'd never quite noticed that.
However, simply preg_replacing the URL isn't quite right. You need to regenerate the URL as though the 'feed' argument isn't set, which might be a little tricky. Conveniently it's usually at the end so the argument can just be removed, but since that isn't a requirement we probably have to go through the arguments and see if they match the current feed argument and remove it, then recreate the URL. It already does something like this to generate the RSS URL for the icon; it's basically the same process in reverse.
Comment #2
fractile81 commentedNo worries!
Yeah, once I posted this "solution", I realized that it over-simplified the real issue. It just happens that on my site that's how it always is so it isn't a problem. And having not looked too hard at the code, this was just the easiest solution.
I will say, though, that it's "working as intended" if the view itself is supposed to be rendered as a feed. It's just when it's creating a feed for a view that this becomes an issue.
So, should this issue be considered a bug, then?
Comment #3
merlinofchaos commentedYes, I would call this a bug.
Comment #4
merlinofchaos commentedThis will now be fixed in 1.6
Comment #5
(not verified) commented