Hi,

I am using the location module with views.

I create nodes and use views with the filter functionality to filter by province.
- I select in the filter "Location: Province Selector"
- expose it.
- use operator =

If I try to filter my node list by province I get the following error:

Fatal error: Call to undefined function dpm() in C:\...\sites\all\modules\location\contrib\location_views\location_views.module on line 826.

I checked the file and I see this code:

dpm('HUH?');
dpm($op);
dpm($filter);
dpm($filterinfo);
dpm($query);


  switch ($filterinfo['field']) {
    case 'province':
dpm($filter['value']);
    $filter['value'] = location_form2api(array('province' => $filter['value']));
      $filter['value'] = $filter['value']['province'];
      break;
  }
  $query->ensure_table($filterinfo[table]);
  $query->add_where("$filterinfo[table].$filterinfo[field] $filter[operator] '$filter[value]'");
}

do you know how fix this error.

Thanks
Carlo

Comments

bdragon’s picture

Assigned: Unassigned » bdragon

Congratulations, you're the first person to hit that code. Apparently it IS still in use. :P

I'll go fix it up.

bdragon’s picture

OK, I committed some fixes, it should work OK now.
http://drupal.org/cvs?commit=144721

bdragon’s picture

Status: Active » Fixed

I am now periodically grepping for dpm before committing. ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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