Hi,

Closest I can find to this is an old D5 issue (for reference: #110308: Removing /feed) so I think this is actually a new bug.

Take a look at this feed:
http://www.drupaler.co.uk/blog/drupal/1

It's attached to this page:
http://www.drupaler.co.uk/blog/drupal/1/page

But it's link tag looks like this (points to itself, the actual RSS):

    <title>Drupal Blog by greg.harvey</title>
    <link>http://www.drupaler.co.uk/blog/drupal/1</link>

That's a bit annoying, because it means our feed links in Planet Drupal are broken. They link back to the feed itself, rather than to the page the feed is attached to! =(

Attachment works fine the other way around (RSS is attached to the page, no problem). It's just the RSS link back to the page that's broken.

Comments

dave reid’s picture

And actually the links of each actual content items are fine, it's the 'home' link of the RSS feed that's the problem. I wonder if you enabled a Page display for this view if it would link back to that.

greg.harvey’s picture

That's exactly what I thought... so I tried it, but no - still links to itself. =(

merlinofchaos’s picture

Category: bug » support

If you have a page display it can be configured to link to the page display, but you must attach the RSS feed to the page display.

greg.harvey’s picture

Category: support » bug

Hi, did that. RSS *is* attached to Page, but still didn't work. Cleared Views cache too, just in case. Here's the view itself:

$view = new view;
$view->name = 'drupal_planet_feeds';
$view->description = 'RSS feeds by user for Drupal Planet';
$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(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'uid' => array(
    'default_action' => 'not found',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => 'Drupal Blog by %1',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '5' => 0,
      '4' => 0,
      '6' => 0,
    ),
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'comment' => 0,
      'page' => 0,
      'project' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'blog' => 'blog',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'tid' => array(
    'operator' => 'and',
    'value' => array(
      '0' => '3',
      '1' => '164',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => 'tid_op',
      'label' => 'Taxonomy: Term',
      'use_operator' => FALSE,
      'identifier' => 'tid',
      'remember' => FALSE,
      'single' => TRUE,
      'optional' => TRUE,
      'reduce' => FALSE,
    ),
    'type' => 'textfield',
    'limit' => TRUE,
    'vid' => '1',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 1,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 30);
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
  'relationship' => 'none',
  'build_mode' => 'teaser',
  'links' => 1,
  'comments' => 0,
));
$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());
$handler->override_option('path', 'blog/drupal/%');
$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,
));
$handler->override_option('displays', array(
  'page_1' => 'page_1',
  'default' => 0,
));
$handler->override_option('sitename_title', FALSE);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'blog/drupal/%/page');
$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,
));
dawehner’s picture

I'm not sure, whether this is a bug report or not. You just used it wrong.

You have to link the display from feed to page and not from feed to feed.

$view = new view;
$view->name = 'drupal_planet_feeds';
$view->description = 'RSS feeds by user for Drupal Planet';
$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 */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['link_display'] = 'feed_1';
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = 30;
$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;
/* Sort criterion: Node: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Argument: User: Uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'users';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_action'] = 'not found';
$handler->display->display_options['arguments']['uid']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['title'] = 'Drupal Blog by %1';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['uid']['break_phrase'] = 0;
$handler->display->display_options['arguments']['uid']['not'] = 0;
/* Filter: Node: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/* Display: Feed */
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->display->display_options['defaults']['link_display'] = FALSE;
$handler->display->display_options['link_display'] = 'page_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'] = 'blog/drupal';
$handler->display->display_options['displays'] = array(
  'page_1' => 'page_1',
  'default' => 0,
);

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'blog/drupal/%/page';

I removed the filter, but the rest is the same

greg.harvey’s picture

StatusFileSize
new112.41 KB

Thanks dereine, will import your view shortly, but I'm totally bemused, because I've done *exactly* as you describe.

So before I over-write what I've done, and to convince me this really isn't a bug, please indulge me and take a look at the screenshot attached of the current UI, before importing your view. It shows the feed display with the attach settings opened. You can see it *is* attached to the page. Is this what you mean? If so, I've done it right and it's broken! If not, what *do* you mean? =/

greg.harvey’s picture

StatusFileSize
new116.61 KB

And to complete the picture, here is the display called "Page", just to prove it really *is* a display of type page the feed is already linking to. (See attached.)

dawehner’s picture

StatusFileSize
new69.73 KB

See this screenshot. You have to change the link to display option.

greg.harvey’s picture

Category: bug » support
Status: Active » Closed (fixed)

Ahhh, then please accept my humblest apologies. I think I need to upgrade Views, because I don't have that option and I just noticed I'm on 6.x-2.6 - latest seems to be 6.x-2.8. Will upgrade and then I guess the link option will appear. =)

greg.harvey’s picture

Just to follow-up, I didn't have this option because my Views was out of date. Sorry for the noise!

mr.j’s picture

I just found this issue as I was going to file the same bug.

Apart from the solution being very non-intuitive, it doesn't handle the use case when your feed does not map directly to a page provided by a view. For example we want our views feed to link to our home page which is a panels page, not a view. i.e. we have completely replaced the built-in Drupal feed because it is not suitable for our needs.

So for anyone else wondering how we fixed this, use the theme information for your feed view and create a template file to override the RSS output. In the template file just set the $link variable to whatever you want (i.e. our homepage in our case).