I've been trying to set up RSS feeds for several customized views, but all of these return a 404 error. Not the usual custom Drupal not found page, but a plain black text/white background 404 error. I've tried changing the feed paths - still no go.
I've followed this tutorial (http://views-help.doc.logrus.com/help/views/example-user-feed) *twice*, but still - any user feed returned results in a 404 error. When I use Live Preview and put in the username as an argument, the XML for the RSS is generated prefectly right below in Live Preview. But for some reason Views is just not generating an actual RSS file at the path.
Suggestions on what to try next?
(user_feed view from tutorial pasted below)
$view = new view;
$view->name = 'user_feed';
$view->description = 'A feed of user nodes.';
$view->tag = 'users';
$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(
'name' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'glossary' => 0,
'limit' => '0',
'case' => 'none',
'path_case' => 'lower',
'transform_dash' => 1,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'4' => 0,
'5' => 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,
'sitenotes' => 0,
'book' => 0,
'feed' => 0,
'group_node' => 0,
'page' => 0,
'rss_item' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'45' => 0,
'1' => 0,
'4' => 0,
'3' => 0,
'5' => 0,
'2' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_php' => '',
),
));
$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',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$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(
'relationship' => 'none',
'item_length' => 'default',
));
$handler->override_option('path', 'feeds/%/rss.xml');
$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(
'default' => 'default',
));
$handler->override_option('sitename_title', FALSE);
Comments
Comment #1
StevenG commentedFigured this out: it wasn't an issue with Views but with Clean URLS. Adding this the rewrite rules in lighttpd.conf fixed the issue:
"^/([^.?]*)/rss.xml$" => "/index.php?q=%1/rss.xml"