Jump to:
| Project: | Views |
| Version: | 6.x-2.1 |
| Component: | page displays |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I have created a Page view, which uses 1 argument to display items from a taxonomy term. When I used the term in the preview box, it produces the expected results. When I click on the views-generated Path link (beneath the preview results), the resulting page is not a view page.
I have found it often to be the case, especially with clashes between pathauto-generated taxonomy urls and Views. Any ideas?
My Views query results:
Query
SELECT node.nid AS nid, node_data_field_imported_image.field_imported_image_fid AS node_data_field_imported_image_field_imported_image_fid, node_data_field_imported_image.field_imported_image_list AS node_data_field_imported_image_field_imported_image_list, node_data_field_imported_image.field_imported_image_data AS node_data_field_imported_image_field_imported_image_data, node_data_field_imported_image.nid AS node_data_field_imported_image_nid, node.type AS node_type, node.title AS node_title, node_data_field_imported_image.field_affil_price2_value AS node_data_field_imported_image_field_affil_price2_value FROM node node LEFT JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN content_type_affiliate_product node_data_field_imported_image ON node.vid = node_data_field_imported_image.vid WHERE (node.type in ('affiliate_product')) AND (node.status <> 0) AND (term_data.vid in ('6')) AND (term_node.tid = 140)
Title
Path: products/product-type/candles
(When I click on that Path link, or go to it manual, it does not produce a Views page.)
Comments
#1
Did you save the view? If you see 'New view' or 'Changed view' in the upper right hand corner, then the current settings on that view are not actually active.
#2
Yes all set there. Any other ideas? View below in its entirety. The view URL with no arguments shows the right results, right display, but all records (not the ones reduced by the argument). For example, by passing the argument "candles" in the URL, I should get a grid view of all of candles. Instead I get normal page of teasers (ie, the page you would get from any taxonomy listing), not the View result.
$view = new view;$view->name = 'product_grid_layout';
$view->description = 'Product Grid with arguments';
$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('fields', array(
'field_imported_image_fid' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'affiliate_prod_thumb_linked',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_imported_image_fid',
'table' => 'node_data_field_imported_image',
'field' => 'field_imported_image_fid',
'relationship' => 'none',
),
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'field_affil_price2_value' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_affil_price2_value',
'table' => 'node_data_field_affil_price2',
'field' => 'field_affil_price2_value',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'tid' => 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' => 'taxonomy_term',
'validate_fail' => 'not found',
'break_phrase' => 0,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'set_breadcrumb' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_node_type' => array(
'aggregation_feed' => 0,
'aggregation_item' => 0,
'blog' => 0,
'image' => 0,
'poll' => 0,
'panel' => 0,
'affiliate_product' => 0,
'book' => 0,
'event' => 0,
'feedapifeed' => 0,
'group' => 0,
'page' => 0,
'story' => 0,
'tip_of_the_week' => 0,
'vendor' => 0,
'wedding_gallery' => 0,
'wedding_gallery_image' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_is_member' => 0,
'validate_argument_vocabulary' => array(
'3' => 0,
'9' => 0,
'8' => 0,
'2' => 0,
'15' => 0,
'6' => 0,
'4' => 0,
'10' => 0,
'14' => 0,
'12' => 0,
'7' => 0,
'11' => 0,
),
'validate_argument_type' => 'convert',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'affiliate_product' => 'affiliate_product',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => 'type_op',
'label' => 'Node: Type',
'use_operator' => 0,
'identifier' => 'type',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'vid' => array(
'operator' => 'in',
'value' => array(
'6' => '6',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'vid',
'table' => 'term_data',
'field' => 'vid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('style_plugin', 'grid');
$handler->override_option('style_options', array(
'grouping' => '',
'columns' => '4',
'alignment' => 'horizontal',
));
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => ' ',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'products/product-type');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
#3
I can confirm this with views -dev and drupal-6.9 below is a view export I made to reproduce this.
$view = new view;$view->name = 'blog_archives';
$view->description = 'User Blog Archives';
$view->tag = 'blog';
$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',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'name' => array(
'default_action' => 'summary desc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1\'s Blogs',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'glossary' => 0,
'limit' => '0',
'case' => 'none',
'path_case' => 'none',
'transform_dash' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_node_type' => array(
'blog' => 0,
'drigg' => 0,
'photos' => 0,
'weblinks' => 0,
'panel' => 0,
'book' => 0,
'calendar' => 0,
'embedded_videos' => 0,
'embedded_video_feeds' => 0,
'gentoo_info' => 0,
'group' => 0,
'group_post' => 0,
'image_gallery' => 0,
'news_feeds' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
'uprofile' => 0,
'work_info' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_vocabulary' => array(
'14' => 0,
'9' => 0,
'8' => 0,
'16' => 0,
'17' => 0,
'18' => 0,
'4' => 0,
'5' => 0,
'11' => 0,
'3' => 0,
'2' => 0,
'6' => 0,
'13' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'override' => array(
'button' => 'Override',
),
),
'created_year' => array(
'default_action' => 'summary desc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => '*',
'wildcard_substitution' => 'All',
'title' => '%1\'s blogs for %2',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'created_year',
'table' => 'node',
'field' => 'created_year',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_node_type' => array(
'blog' => 'blog',
'drigg' => 0,
'photos' => 0,
'weblinks' => 0,
'panel' => 0,
'book' => 0,
'calendar' => 0,
'embedded_videos' => 0,
'embedded_video_feeds' => 0,
'gentoo_info' => 0,
'group' => 0,
'group_post' => 0,
'image_gallery' => 0,
'news_feeds' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
'uprofile' => 0,
'work_info' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_vocabulary' => array(
'14' => 0,
'9' => 0,
'8' => 0,
'16' => 0,
'17' => 0,
'18' => 0,
'4' => 0,
'5' => 0,
'11' => 0,
'3' => 0,
'2' => 0,
'6' => 0,
'13' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'override' => array(
'button' => 'Override',
),
),
'created_day' => array(
'default_action' => 'summary desc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => '*',
'wildcard_substitution' => 'All',
'title' => '%1\'s blog post for %2-%3',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'created_day',
'table' => 'node',
'field' => 'created_day',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_node_type' => array(
'blog' => 0,
'drigg' => 0,
'photos' => 0,
'weblinks' => 0,
'panel' => 0,
'book' => 0,
'calendar' => 0,
'embedded_videos' => 0,
'embedded_video_feeds' => 0,
'gentoo_info' => 0,
'group' => 0,
'group_post' => 0,
'image_gallery' => 0,
'news_feeds' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
'uprofile' => 0,
'work_info' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_vocabulary' => array(
'14' => 0,
'9' => 0,
'8' => 0,
'16' => 0,
'17' => 0,
'18' => 0,
'4' => 0,
'5' => 0,
'11' => 0,
'3' => 0,
'2' => 0,
'6' => 0,
'13' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
),
'created_month' => array(
'default_action' => 'summary desc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => '*',
'wildcard_substitution' => 'All',
'title' => '%1\'s blog post for %4, %3 %2',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'created_month',
'table' => 'node',
'field' => 'created_month',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_node_type' => array(
'blog' => 0,
'drigg' => 0,
'photos' => 0,
'weblinks' => 0,
'panel' => 0,
'book' => 0,
'calendar' => 0,
'embedded_videos' => 0,
'embedded_video_feeds' => 0,
'gentoo_info' => 0,
'group' => 0,
'group_post' => 0,
'image_gallery' => 0,
'news_feeds' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
'uprofile' => 0,
'work_info' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_vocabulary' => array(
'14' => 0,
'9' => 0,
'8' => 0,
'16' => 0,
'17' => 0,
'18' => 0,
'4' => 0,
'5' => 0,
'11' => 0,
'3' => 0,
'2' => 0,
'6' => 0,
'13' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'override' => array(
'button' => 'Override',
),
),
));
$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',
),
'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('empty', 'no results found, checkout the <a href="blog/">blog</a> page for more results.
');
$handler->override_option('empty_format', '1');
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
'teaser' => 1,
'links' => 1,
'comments' => 0,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'blog');
$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,
));
Everything works in preview mode and while viewing the view's page path but when arguments are added the nodes show instead of view listings.
EDIT: after doing some more testing I came to the conclusion that the view is conflicting with the "blog" path link because when I change the path to something other than "blog" it works both ways, maybe I am just missing something here but I thought that you could override url paths with a view, my guess is that the path he is using belongs to another module as it's why it only works in preview mode not in full mode. I deleted all my aliases to rule out any clashes but I can't get the view to take the first argument.
#4
Thanks for taking a look. As far as the conflict goes, it was sort of intentional. How else do you overcome the need for different displays based on taxonomies with different content types and fields? I wanted to my Pathauto urls generated by those taxonomy terms to match up to the view argument. Is there a better way?
If i simply use the taxonomy/term/% view, it will overwrite the results for all taxonomies which wont work for me since i need teaser view for some, grid for others, etc.
I would ideally like to use panels for this, but since Panels has a bug in vocabulary context that isnt working either. Any input is greatly appreciated.
#5
Ok, let me explain a bit.
If you're using a URL that pathauto is aliasing, then that happens first; Views never sees it. It sounds like that's what ablewave is running into. As far as using different views for different vocabularies, ablewave, try the Taxonomy Redirect module which might help a little, but without something extra, you can't override vocabularies individually right now.
Likewise, likewhoa, your problem is that the menu system cares about specificity. Your menu item is just 'blog' while the blog module uses 'blog/%'. So for using 'blog/1' it gets the priority and menu hands off to it. You could add a second display to your view with the path 'blog/%' and that should override the blog menu item.
#6
Thanks merlinofchaos for the explanation in how the menu system handles urls, I managed to get my view to work with a "/blog/%/%" path with 4 arguments $username,$year,$date & $month. I was not able to actually get a correct view working with just "blog/%" so that blog/username would show the view summary since path auto was set with blog/[user-raw] which made the view see blog/uid instead of blog/username. So for now this is the view that is working together with blog/* and pathauto enabled. I would say this issue is fixed for me.
#7
I see, that does seem like what I was running into. I will look at Taxonomy Redirect, but it looked like I should be able to do it with Panels on a vocabulary basis by using default views with arguments. True?
Thanks for the response, this can be closed.
#8
You should, but Panels is currently broken with respect to menu overries in D6; Panels 3 will be able to do it, but as of the alpha2 I just released, the taxonomy_term override isn't implemented. =)
It will be by alpha3 though.
#9
Thanks Merlin,
I know you have a ton going on, any idea of a timetable? Advice on alpha3 vs. 6.3.x?
#10
FYI folks, looks like Taxonomy Redirect and the right settings feeding back into Views will get my problem most of the way there. Would still like to see the Panels/Views/context issue get fixed.
Thanks for all your help!
#11
Automatically closed -- issue fixed for 2 weeks with no activity.