If you have a view with more then one Feed Display, each with a different Path in the Feed settings, the channel link will always be the Path of the first Feed Display.

For example; I have 2 Feed Displays with the following paths:

  • blog/category1/rss
  • blog/category2/rss

The output of the first Feed display would be something like:

<channel>
    <title>Category 1 Blog</title>
    <link>http://www.example.com/blog/category1/rss</link>
    ....
</channel>

The second Feed display would be something like:

<channel>
    <title>Category 2 Blog</title>
    <link>http://www.example.com/blog/category1/rss</link>
    ....
</channel>

Comments

Charles Belov’s picture

For that matter, the generated channel link contains the first path, whether that path is from a page or an RSS feed. If the feeds are preceded by a page display, the link contains the URL of that page.

Per the RSS 2.0 specs for required channel fields, link is supposed to be "The URL to the HTML website corresponding to the channel." So the URL of the feed itself is not an appropriate URL for the channel link. But only the person programming the view would know whether the first page display having a path is an appropriate link value for the channel link.

Therefore, an RSS display requires two path fields: the path of the RSS display (currently specifiable) and the path of the channel link (currently assumed and therefore possibly wrong, with no way to specify the correct channel link path).

So this bug report would better specify the need to add a channel link path for each RSS display and to never assume what that path is.

uq’s picture

If we want to fix the RSS feed to get the correct url of the feed, we need to change:
$link_display_id = $view->display_handler->get_link_display();
to:
$link_display_id = $view->display_handler->view->current_display;

However I agree to above comment and think we should follow the RSS standard. Therefore I created a patch to fetch the site front page url for the channel link field.

uq’s picture

Status: Active » Needs review