After upgrading from 7.x-3.0-alpha6 to 7.x-3.0-alpha9 started getting the following error.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'location.provinces' in 'where clause'

Traced this issue through to
handlers/location_handler_argument_location_province.inc line 46

$this->query->add_where(0, "$this->table_alias.$this->real_field $operator \"%s\"", $this->argument);

removing the \"%s\" appears to resolve the issue.

View Definition as follows

$view = new view();
$view->name = 'dealer2';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Dealer2';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Dealer2';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['view_mode'] = 'full';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Location: Country */
$handler->display->display_options['arguments']['country']['id'] = 'country';
$handler->display->display_options['arguments']['country']['table'] = 'location';
$handler->display->display_options['arguments']['country']['field'] = 'country';
$handler->display->display_options['arguments']['country']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['country']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['country']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['country']['summary_options']['items_per_page'] = '25';
/* Contextual filter: Location: Province */
$handler->display->display_options['arguments']['province']['id'] = 'province';
$handler->display->display_options['arguments']['province']['table'] = 'location';
$handler->display->display_options['arguments']['province']['field'] = 'province';
$handler->display->display_options['arguments']['province']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['province']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['province']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['province']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['province']['break_phrase'] = 0;
/* Contextual filter: Location: City */
$handler->display->display_options['arguments']['city']['id'] = 'city';
$handler->display->display_options['arguments']['city']['table'] = 'location';
$handler->display->display_options['arguments']['city']['field'] = 'city';
$handler->display->display_options['arguments']['city']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['city']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['city']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['city']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['city']['limit'] = '0';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'dealer' => 'dealer',
);

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'dealer2';
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

somatics’s picture

I have this exact same issue. My location-based directory is returning blank pages as a result.

brei9000’s picture

Same issue here.

kevster111’s picture

\"%s\" Removing this and the space before it worked just like you wrote. Thanks.

dnotes’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
1.03 KB

Patch for this issue is attached. I'm upgrading to major since I think it will break any view with a location province argument, which should actually be pretty common.

The odd part is that this didn't fail for me until I updated to alpha9, whereas this looks like 6.x code. Grepping through the code base it looks like there are some other relics of 6.x code in a few of the supported/*.inc files. I wonder if a backport went awry or something.

podarok’s picture

Version: 7.x-3.0-alpha9 » 7.x-3.x-dev
Status: Needs review » Fixed

#4 commited pushed to 7.x-3.x
will be tagged in upcoming rc
Thanks!!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.