-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zip code search not returning results for certain zip codes #739
Comments
In case it matters, these are the zip codes that don't work: 25177 |
I saved a post with address "2503 Maccorkle Ave, St Albans, WV 25177", and a search for 25177 finds it. Which map provider are you using? |
I'm using Google V3 without an API key. I just tried it with Leaflet and This is strange! On Thu, Mar 31, 2016 at 10:53 AM, Dylan Kuhn [email protected]
|
Can you add a post with the same address I used and see if that is found? On Thu, Mar 31, 2016 at 7:58 AM, lsterling03 [email protected]
|
Unfortunately, that address didn't work either. So strange that it only It seems clear now that the problem is on my end, but frustrating that I Thanks! On Thu, Mar 31, 2016 at 11:05 AM, Dylan Kuhn [email protected]
|
Just to add to this.... If I type in the city name "St Albans" or "St Albans, VA" into the search field, the location does show up. It just doesn't show up if I type in the zip code "25177". I went line-by-line in the database to see if there was any difference in the way the working and non-working locations were saved, and they are all formatted the same. Stumped. |
That should result in a geocode request like this: https://maps.google.com/maps/api/geocode/json?address=25177&language=en Which returns St Albans for me. The only twist I can see is if your site language is not set to English perhaps? |
The site is set to English. I'm still trying to figure this out. I took a clone of the entire site and put it on another server, and everything works fine. So then I tried cloning that clone and moving it back to the live server... but the zips still will won't work there. The site is hosted on Rackspace cloud. I spent an hour on the phone with their tech support and they couldn't find anything wrong or anything different between the working and non-working server technology. Can you think of anything that would possibly be incompatible with Rackspace cloud sites? One thing I did notice in the database is that the postal code field was not always filled in correctly for each location. Sometimes there were just 4 seemingly random numbers. But there wasn't any consistency in the mistakes -- meaning, some of the broken zips had correct postal code fields. And some of the working zips had incorrect postal code fields. But in case that was the problem, I manually edited the postal code field in the database for all locations and that field didn't have any effect either way. Have you ever heard of any problems with your plugin on Rackspace?
|
No, I don't know of any Rackspace-specific issues. You could use this small plugin to see what results the URL above gives you on the Rackspace server. |
Thanks for that plugin -- interesting results. I put in this URL: The Rackspace site returned this: {"headers":{"content-type":"application/json; charset=UTF-8","date":"Thu, So it seems Rackspace requires you to use an API key. But that doesn't make Crazy. I'll sign up for an API and see if that changes anything. On Wed, Apr 13, 2016 at 11:35 PM, Lindsay Sterling [email protected]
|
I signed up for a standard API and entered it into the Geo Mashup settings. The zips still don't work with the API. |
I was never able to get those geocoding requests to work with an API key, On Thu, Apr 14, 2016 at 7:19 AM, lsterling03 [email protected]
|
Here's request with my API key: And here's a test page on Rackspace, stripped down with only 2 locations, http://www.landsaver.net.php56-29.ord1-1.websitetestlink.com/warehouse-locations/ Type in 22801 into the zip code search in the sidebar and you won't get any On Thu, Apr 14, 2016 at 11:05 AM, Dylan Kuhn [email protected]
|
I'm hoping that #752 will solve this. |
I'm actually experiencing this on a recent install. Zip codes 55123 and 56085 aren't working: https://yettioutdoors.com/dealers/ I tried a direct API call with my key and it does return results: https://maps.google.com/maps/api/geocode/json?address=56085&language=en&key=mykey Any thoughts? What else should I check? |
@TheJester12, do you know if that is also a rackspace server? Have you tried using the remote request plugin to see if the results are the same on the server? |
The other thing that might be of interest could be added to your search results template after the No Results Found message: <p><?php _e( 'No results found.', 'GeoMashup' ); ?></p>
<?php if ( GeoMashupDB::$geocode_error ) : ?>
<--
<?php echo GeoMashupDB::$geocode_error->get_error_code(); ?>
<?php echo GeoMashupDB::$geocode_error->get_error_message(); ?>
-->
<?php endif; ?> |
Using the search widget with zip code, and it works for most of our locations. But there are four locations that do not show up in the results even if I type in their exact zip code. I've confirmed that their location info is correctly entered in the post. Those locations properly appear on the map and mashup map.
I don't see any errors in the console. I turned on debugging and no errors there either. I've deactivated all plugins and tried it with Twenty Ten. The problem remains.
I tried changing the zip code on one of the problem locations to a zip code that I know works. When I do that, it shows up in search results. When I changed it back to its real zip code, it no longer shows up in search results. I've, of course, made sure the radius was large enough.
I'm not sure what else to tell you. Can you think of a reason why this would happen, or what else I can do to troubleshoot?
The text was updated successfully, but these errors were encountered: