RSS link on summary view using '*' instead of custom Wildcard
RobRoy - December 11, 2006 - 21:19
| Project: | Views |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Crell |
| Status: | patch (code needs review) |
Description
This view has 'all' as the wildcard for the first arg and the 'archive' page view is still using '*' instead of 'all' in the RSS icon link. Looks like this is coming from views_node.inc's views_post_view_make_args() function.
<?php
$view = new stdClass();
$view->name = 'archive';
$view->description = 'A monthly archive of blog entries.';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'The Toby Archives';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '3';
$view->page_empty = '';
$view->page_empty_format = '3';
$view->page_type = 'teaser';
$view->url = 'archive';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->block = TRUE;
$view->block_title = 'The Toby Archives';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '3';
$view->block_empty = '';
$view->block_empty_format = '3';
$view->block_type = 'list';
$view->nodes_per_block = '4';
$view->block_more = TRUE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => 'normal',
),
);
$view->argument = array (
array (
'type' => 'monthyear',
'argdefault' => '5',
'title' => 'Monthly Archive For %1',
'options' => '',
'wildcard' => 'all',
'wildcard_substitution' => 'All Months',
),
array (
'type' => 'node_feed',
'argdefault' => '2',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'blog',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
?>
#1
This should be fixed in 1.4
#2
#3
#4
The bug is still present in Views 5.x-1.6.
#5
reopening
#6
I can confirm that this is still present. The workaround for now is to manually specify * as the wildcard for optional arguments. The problem is that views_post_view_make_args() hard-codes * as the default wildcard rather than using the user-specified one. The attached patch against 5.x-1.6 fixes it. (it's a one-liner, so should apply to 5.x-dev too but I've not checked.)