I am unable to duplicate all of these errors, but quite a few users of our site (spiralscouts.org) have reported SQL errors when searching by zip code. Zip codes that have failed for users include 95035, 78733, 20850
The error they're getting says:
user warning: Column 'nid' in field list is ambiguous query: SELECT COUNT(DISTINCT (nid)) AS count FROM node n INNER JOIN location l ON n.vid = l.eid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'term_access'))) AND ( l.type ='node' AND l.latitude > 29.967968269 AND l.latitude < 30.691439731 AND l.longitude > -98.294196696 AND l.longitude < -97.456003304 AND (IFNULL(ACOS(0.863133871022*COS(RADIANS(latitude))*(-0.137014070551*COS(RADIANS(longitude)) + -0.99056910131*SIN(RADIANS(longitude))) + 0.504975168394*SIN(RADIANS(latitude))), 0.00000)*6372663.41298) < 40233.68) in /home/spiralscouts.org/public_html/includes/database.mysql.inc on line 172.
One user suggests: The above error is relatively easy to fix, I believe it should be "SELECT COUNT(DISTINCT (n.nid))". Having worked with Drupal in the past the hardest part is finding the file which this query came from
However....I'm confused as to why some people have isssues, and I can't duplicate them.
Comments
Comment #1
bdragon commentedMarking as duplicate of #319278: [master][meta] Location_search rewrite.