Hi,

I'm getting the following warning

I'm on drupal 6.13

Using views to filter by:
- proximity ( works by itself
- taxonomy ( displays error only when a field is selected.)

user warning: Unknown column 'location.vid' in 'IN/ALL/ANY subquery' query: SELECT location.lid AS lid, node.title AS node_title, node.nid AS node_nid, (IFNULL(ACOS(0.81986665865376*COS(RADIANS(location.latitude))*(-0.7501190566878*COS(RADIANS(location.longitude)) + 0.66130280567514*SIN(RADIANS(location.longitude))) + -0.57255450572668*SIN(RADIANS(location.latitude))), 0.00000)*6371102.9396379) AS location_distance_1 FROM location location LEFT JOIN location_instance location_instance ON location.lid = location_instance.lid LEFT JOIN node node ON location_instance.vid = node.vid WHERE (node.status <> 0) AND (location.latitude > -35.827859075336 AND location.latitude < -34.029244924664 AND location.longitude > 137.50377571858 AND location.longitude < 139.69760828142) AND (location.vid IN ( SELECT tn.vid FROM term_node tn WHERE tn.tid = 24 )) LIMIT 0, 10 in D:\Program Files\wamp\www\childcck\modules\acquia\views\includes\view.inc on line 755.
Files: 
CommentFileSizeAuthor
#7 200003[1].jpg22.97 KBasfadel

Comments

juicytoo’s picture

I'm using the views taxonomy dropdown.

cheers

raffi’s picture

Priority:Normal» Critical

having the same issue

tom_buytaert’s picture

I'm also having the exact same issue:

Filters:
- taxonomy
- proximity filter

when does it happen:
- when a term is selected in the taxonomy dropdown, i get this error.
- when no term is selected, no error

karimahmed’s picture

Same problem for me - it's causing lots of grief during my upgrade from Drupal 5 to 6

bensquare’s picture

same problem, subscribing

tom_buytaert’s picture

maybe useful to also mention that Location-3.1.RC1 also has this same bug, so it's not just the dev-version.

Does anybody have a clue as to how to (begin to) solve this? Or is this caused by a bug in Views?

asfadel’s picture

Status:Active» Closed (fixed)
StatusFileSize
new22.97 KB

It's true. I had the same trouble and here is the answer:

I don't no why we choosing Location View type when Adding new View and what for, but

The view type is the primary table for which information is being retrieved. The view type controls what arguments, fields, sort criteria and filters are available, so once this is set it cannot be changed.

There is no 'location.vid' column inside 'location' table. This part of information is in 'location_instance' table. And when you choose Location View type when creating new View, View module has no idea what Node you are looking for inside Location.

If we are looking for the Node we gotta chose Node View type.
Attached image show wrong Location View type choice you do and right Node View type.

gianfrasoft’s picture

Thank you @asfadel.

#7 has solved a big problem to me about the strange behavior of an exposed filter on a term of taxonomy: any value I put in that filter, the view returned an empty set.

Thanks again.