Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tried to test the version3 and my location items got broken, all of them (street, city, province,...) in arguments, filters and fields.
Then i tried to go back but no chance.
$view = new view;
$view->name = 'location_directory';
$view->description = 'Location directory filtered by arguments in the url.';
$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(
'title' => array(
'label' => 'Title',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'street' => array(
'label' => 'Street',
'style' => 'both',
'exclude' => 0,
'id' => 'street',
'table' => 'location',
'field' => 'street',
'relationship' => 'none',
),
'city' => array(
'label' => 'City',
'exclude' => 0,
'id' => 'city',
'table' => 'location',
'field' => 'city',
'relationship' => 'none',
),
'province' => array(
'label' => 'Province',
'style' => 'name',
'exclude' => 0,
'id' => 'province',
'table' => 'location',
'field' => 'province',
'relationship' => 'none',
),
'postal_code' => array(
'label' => 'Postal Code',
'exclude' => 0,
'id' => 'postal_code',
'table' => 'location',
'field' => 'postal_code',
'relationship' => 'none',
),
'country' => array(
'label' => 'Country',
'style' => 'name',
'exclude' => 0,
'id' => 'country',
'table' => 'location',
'field' => 'country',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'country' => array(
'default_action' => 'summary asc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'country',
'table' => 'location',
'field' => 'country',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_php' => '',
),
'province' => array(
'default_action' => 'summary asc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%2',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'province',
'table' => 'location',
'field' => 'province',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_php' => '',
),
'city' => array(
'default_action' => 'summary asc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%3',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'glossary' => 1,
'limit' => '1',
'case' => 'none',
'path_case' => 'none',
'transform_dash' => 0,
'id' => 'city',
'table' => 'location',
'field' => 'city',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'status_extra' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_extra',
'table' => 'node',
'field' => 'status_extra',
'relationship' => 'none',
),
'lid' => array(
'operator' => 'not empty',
'value' => array(
'value' => '',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'lid',
'table' => 'location',
'field' => 'lid',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'title' => 'title',
'street' => 'street',
'city' => 'city',
'province' => 'province',
'postal_code' => 'postal_code',
'country' => 'country',
),
'info' => array(
'title' => array(
'sortable' => 1,
'separator' => '',
),
'street' => array(
'sortable' => 1,
'separator' => '',
),
'city' => array(
'sortable' => 1,
'separator' => '',
),
'province' => array(
'sortable' => 1,
'separator' => '',
),
'postal_code' => array(
'sortable' => 1,
'separator' => '',
),
'country' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('title', 'Locations');
$handler->override_option('path', 'location/directory');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Locations',
'description' => '',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
Comments
Comment #1
dawehnerDid you already reported this to location module?
I guess perhaps location module is not compabitle to views3.
Comment #2
egarias CreditAttribution: egarias commentedOk I just reported in location project http://drupal.org/node/721286