Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2008 at 16:53 UTC
Updated:
16 Sep 2008 at 19:05 UTC
Using Drupal 6.4 and CCK 6.x-2.0-rc5, I have five different taxonomy vocabularies, all single depth terms (brand, product, class, colors, segment). I want to supply the first three terms through the URI, have tabs for the colors vocabulary, and sort by the segment term weight.
The two page tabs work fine when I have only two arguments (products/%/%/color & products/%/%/monochrome), but adding a third (products/%/%/%/color & products/%/%/%/monochrome) causes an error. Not sure if this is operator-error, Views or core issue. Any ideas?
Thanks,
david
Error Message (x5):
warning: Invalid argument supplied for foreach() in /includes/menu.inc on line 376.
SELECT DISTINCT(node.nid) AS nid,
term_data.weight AS term_data_weight
FROM node node
INNER JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_node term_node2 ON node.vid = term_node2.vid AND term_node2.tid != 25
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
WHERE (node.status <> 0) AND (node.type in ('product')) AND (term_node.tid = 25) AND (term_node2.tid IN (18, 19, 20, 21, 22, 23))
ORDER BY term_data_weight ASC $view = new view;
$view->name = 'product_pages';
$view->description = 'The pages for all products';
$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(
'weight' => array(
'order' => 'ASC',
'id' => 'weight',
'table' => 'term_data',
'field' => 'weight',
'override' => array(
'button' => 'Override',
),
'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' => 'ignore',
'break_phrase' => 1,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'set_breadcrumb' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'image' => 0,
'page' => 0,
'product' => 0,
'product_hardware' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'2' => 2,
'7' => 0,
'4' => 0,
'6' => 0,
'5' => 0,
'1' => 0,
),
'validate_argument_type' => 'convert',
'validate_argument_php' => '',
),
'tid_1' => 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' => 'ignore',
'break_phrase' => 1,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'set_breadcrumb' => 0,
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'image' => 0,
'page' => 0,
'product' => 0,
'product_hardware' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'7' => 7,
'2' => 0,
'4' => 0,
'6' => 0,
'5' => 0,
'1' => 0,
),
'validate_argument_type' => 'convert',
'validate_argument_php' => '',
),
'tid_2' => 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' => 'ignore',
'break_phrase' => 1,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'set_breadcrumb' => 0,
'id' => 'tid_2',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'image' => 0,
'page' => 0,
'product' => 0,
'product_hardware' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'4' => 4,
'2' => 0,
'7' => 0,
'6' => 0,
'5' => 0,
'1' => 0,
),
'validate_argument_type' => 'convert',
'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',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'product' => 'product',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'25' => '25',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '6',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'tid_1' => array(
'operator' => 'or',
'value' => array(
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '5',
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('title', 'Products');
$handler->override_option('empty', 'No Products');
$handler->override_option('empty_format', '2');
$handler->override_option('items_per_page', 6);
$handler->override_option('use_pager', 'mini');
$handler->override_option('distinct', 1);
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
'teaser' => 1,
'links' => 1,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$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(
'product' => 'product',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'24' => '24',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '6',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'tid_1' => array(
'operator' => 'or',
'value' => array(
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '5',
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('path', 'products/%/%/%/color');
$handler->override_option('menu', array(
'type' => 'default tab',
'title' => 'Color',
'weight' => '0',
));
$handler->override_option('tab_options', array(
'type' => 'normal',
'title' => 'Color',
'weight' => '0',
));
$handler = $view->new_display('page', 'Page', 'page_2');
$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(
'product' => 'product',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'25' => '25',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '6',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'tid_1' => array(
'operator' => 'or',
'value' => array(
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'vid' => '5',
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'relationship' => 'none',
'reduce_duplicates' => 0,
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('path', 'products/%/%/%/monochome');
$handler->override_option('menu', array(
'type' => 'tab',
'title' => 'Black & White',
'weight' => '1',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
Comments
Comment #1
dcasey commentedComment #2
merlinofchaos commentedWhat you're not seeing, because you have notices off, is this:
The $load_functions is getting clipped at 255, probably due to database size, but Views needs more than that. The reason that Views needs so much space is that it's storing view and display id info as arguments so that the views loader function knows what to look ati.
This is a core issue, though you might be able to work around this by doing an alter table on menu_router to increase the size of the field.
Comment #3
merlinofchaos commentedhttp://drupal.org/node/227486
Comment #4
pwolanin commentedduplicate to: http://drupal.org/node/227486