I am seeing the following error with the GMap module when creating a view:

user warning: Unknown column 'users_roles.rid' in 'field list' query: SELECT location.lid AS lid, location.latitude AS location_latitude, location.longitude AS location_longitude, location.latitude AS gmap_lat, location.longitude AS gmap_lon, users_roles.rid AS gmap_role_marker FROM location location LIMIT 0, 10 in /var/www/drupal-6.20/sites/all/modules/views/includes/view.inc on line 771.

I am not sure if this is a problem with GMap, or with Views.
I am using GMap 6.x-1.1

I also created an issue under GMap, in http://drupal.org/node/1157960

Comments

mkmk’s picture

I suspect the issue is that due to running Drupal on PHP5.3, which is not compatible, the view created used an SQL statement that was incorrect.

The incorrect statement must have been created due to an exception.

This is all a guess.

dawehner’s picture

Project: Views (for Drupal 7) » Location
Version: 6.x-2.12 » 6.x-3.x-dev
Component: Code » Location_views

This is not an issue with php 5.3 from my perspective.

But the issue seems to be a problem of the location module.

Xomby’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

Still an issue in 7.x - which is a direct port of the 6.x branch, I understand.

The issue is caused by using a GMAP style view with markers by user role on a view that is showing nodes. This is hardcoded into gmap_plugin_style_gmap.inc on line #71:

    elseif ($this->options['markers'] == 'userrole') {
      $this->view->query->add_field('users_roles', 'rid', 'gmap_role_marker');
    }

I don't find any relation to the location module for this specific issue, and recommend we move over to the GMAP issue to continue the conversation.