Closed (fixed)
Project:
Views (for Drupal 7)
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2006 at 20:18 UTC
Updated:
28 Nov 2006 at 06:00 UTC
I am running 4.7.3 and the latest Views Module.
If I create a view to override the system path taxonomy/term/n with n being a term id argument, I cannot get the custom view to display. I still get the default taxonomy overview page.
If I change the URL in the view to something like tax/term/n and hit the page that way, the view works as expected.
Any reason (a conflict with another module perhaps) why Views Module isn't overriding the system path as it should?
Comments
Comment #1
pete@fiddley.com commentedAttached is the export of the view:
$view = new stdClass();
$view->name = 'taxonomy_term';
$view->description = 'The taxonomy view with a depth of 0.';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'taxonomy';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'list';
$view->url = 'taxonomy/term';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'sticky',
'sortorder' => 'DESC',
'options' => '',
),
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => '',
),
);
$view->argument = array (
array (
'type' => 'taxid',
'argdefault' => '2',
'title' => '',
'options' => '0',
'wildcard' => '',
'wildcard_substitution' => '',
),
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',
),
array (
'tablename' => 'node',
'field' => 'created',
'label' => '',
'handler' => 'views_handler_field_date_custom',
'options' => 'l, F j, Y',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
Comment #2
pete@fiddley.com commentedThis view seems to work if the taxonomy module is disabled. This defeats the purpose of overriding a system view however as now now taxonomy links, breadcrubms, etc are no longer automatically generated with links to the taxonomy pages.
Isn't the point of the Views override of system paths so that this very case is handled?
Comment #3
pete@fiddley.com commentedmerlinofchaos responded to an email offline:
I made the change and it worked. Not sure why this isn't the default case when the module installs though. Does this need to be addressed in the module specifically or is this a problem elsewhere?
Comment #4
drawk commentedJust wanted to say thanks for posting the email here online. I was having the same trouble.
Do I understand correctly that we need to modify this directly in the SQL rather than through the regular Drupal admin menus?
Comment #5
merlinofchaos commentedIt is not the default because when I was experimenting it never really seemed to need to be. In a future version I will make the installer/updater do this. For now I leave this issue open with the workaround available.
Comment #6
merlinofchaos commentedViews 1.1 will update the module weight properly when update.php is run.
Comment #7
(not verified) commented