Problem: All rss displays on a view will have the xml:base attribute on the rss tag set to the value of the first rss display for that view.

Steps to recreate: Create a view with two rss displays "x" and "y". Inspect the source code of both feeds. Notice that the first line for both feeds reads: <?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://my.site/x.xml" xmlns:dc="http://purl.org/dc/elements/1.1/">

Now reorder the displays so that "y" comes before "x" and the first line for both feeds now reads <?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://my.site/y.yml" xmlns:dc="http://purl.org/dc/elements/1.1/">

While not affecting the actual feed contents, this has the unfortunate side effect of making google reader (and likely other digests) display (title unknown) for the feed.

Note: Here is the offending line in the default rss template <rss version="2.0" xml:base="<?php print $link; ?>"<?php print $namespaces; ?>>

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

I tryed to setup a very simple view

$view = new view;
$view->name = 'feeds';
$view->description = '';
$view->tag = '';
$view->base_table = 'node';
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;

/* Display: Feed */
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->display->display_options['style_plugin'] = 'rss';
$handler->display->display_options['style_options']['mission_description'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node_rss';
$handler->display->display_options['path'] = 'feed';
$handler->display->display_options['displays'] = array(
  'default' => 'default',
);

/* Display: Feed */
$handler = $view->new_display('feed', 'Feed', 'feed_2');
$handler->display->display_options['style_plugin'] = 'rss';
$handler->display->display_options['style_options']['mission_description'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node_rss';
$handler->display->display_options['path'] = 'feed';
$handler->display->display_options['displays'] = array(
  'default' => 'default',
);

Sadly i couldn't reproduce the bug.

On the views issue create page is a link to http://drupal.org/node/571990.
There you can read that it's highly recommended to export the view :) In general it's worth to read this document.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
nonprofit’s picture

Status: Closed (cannot reproduce) » Active

I'm having a similar problem with Views 6.x-2.12.

View created to generate feed and Google Reader reads the title of the feed as "(title unknown)"

View is a simple one:

$view = new view;
$view->name = 'aggregated_feed';
$view->description = 'Aggregates News and Blog posts into a RSS feed.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('sorts', array(
  'status' => array(
    'order' => 'DESC',
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'blog' => 'blog',
      'news' => 'news',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'News Feed');
$handler->override_option('items_per_page', 25);
$handler->override_option('row_plugin', 'node');
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->override_option('style_plugin', 'rss');
$handler->override_option('style_options', array(
  'mission_description' => FALSE,
  'description' => '',
));
$handler->override_option('row_plugin', 'node_rss');
$handler->override_option('row_options', array(
  'relationship' => 'none',
  'item_length' => 'default',
));
$handler->override_option('path', 'news/feed');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('displays', array());
$handler->override_option('sitename_title', 1);

May be related to http://drupal.org/node/225825

Any assistance appreciated. Thanks!

nonprofit’s picture

Status: Active » Closed (fixed)

In an unexpected twist, changing the path from /news/feed to /news/feed.xml (and resubscribing) causes Google Reader to properly display title.