On my installation I get the following error:
user warning: Unknown column 'openlayers_proximity.distance' in 'field list' query:
SELECT
node.nid AS nid,
node.title AS node_title,
node.type AS node_type,
node.vid AS node_vid,
openlayers_proximity.distance AS unknown
FROM node node
RIGHT JOIN openlayers_proximity openlayers_proximity ON node.nid = openlayers_proximity.nid
LEFT JOIN content_type_heim_verzeichnis node_data_field_heim_anschrift ON node.vid = node_data_field_heim_anschrift.vid
WHERE node.type in ('heim_verzeichnis')
GROUP BY nid, unknown, node_title, node_type, node_vid, field_heim_geo_geo_astext ORDER BY unknown ASC in /WEBSITES/[...]/sites/all/modules/views/includes/view.inc on line 775.
This happens when the location of the exposed filter is not set to a value. This leads to openlayers_proximity_handler_field::query() not setting any field. So views takes distance as field and unknown as alias.
For avoiding this behaviour we can use the real_field and fall back on the views default handler.
Therefore see the attached patch, this resolved this special issue.
Comments
Comment #1
derhasi commentedHm, the real field is used to get the field, that delivers the distance value, not good. o the rendered output is wrong.
The patch attached solves this issue for the moment, but there is more to do (use alias and co in a consistent way).
Comment #2
dagomar commentedNeither patch worked for me :(
Also, when I do have values in the exposed filter, after i click the sort on distance, the view is empty.
Comment #3
avpadernoI am closing this issue, since it is for a Drupal version that is no longer supported. Please re-open this issue if it is relevant for a project release for a supported Drupal version.