When trying to filter by province, the query returns an empty result, but i checked the location table in the database and it had the data for province all filled in. It works for country and city though.

Here is the query sentence printed by Views:
"SELECT node.title AS node_title, node.nid AS nid
FROM
{node} node
LEFT JOIN {location_instance} location_instance ON node.vid = location_instance.vid
LEFT JOIN {location} location ON location_instance.lid = location.lid
WHERE (( (node.type IN ('partners')) AND (node.status = '1') AND (location.province = 'PR') ))
ORDER BY node_title ASC"

Comments

hongpong’s picture

Blah I'm having the same problem on 6.x... it seems like maybe the country jumps in first - see if changing the country location of the whole site alters the behavior? see #1225306: error "The operator is invalid" when adding "Location:country" to filter Views

anthem0n’s picture

Hi all,

I have a similar problem. My filter use "LID" (location id) instead of province name.

Example : I have Province A (lid 4), Province B(lid 11)...

When filter choice is Province A, no results. But when filter choice is 11, sort me Province B.

How province name can be filtered instead lid ??

Another bug : My "Province name" is a 'profile2 field' and can't use relationship (profile -> location field) into Views ? Why ?

Any Help ?
Thanks in advance