Most communities are working fine, but this recently-added location is not loading on the front end (displays west coast of Africa).
hidden link
I have confirmed that both API keys are installed correctly (one restricted for front end, one unrestricted for server-side). I have also confirmed that all 3 APIs are enabled: Places, Maps Javascript and Geocoding.
Also, the address loads fine in the dashboard edit page.
I have emptied the site cache as well.
Any other ideas?
Hi, please try the following troubleshooting steps and let me know the results:
- Temporarily deactivate all plugins except Types, Views and Maps. Activate a default theme like Twenty Nineteen and test again.
- You mentioned clearing the site cache, but that can mean different things so I'm not clear which cache you deleted. There is a cache specific to mapped addresses. Go to Toolset > Settings > Maps and click "Load cached data". Find the cached entry that corresponds with this address, and delete it. Test the page again on the front-end of the site, and watch for any JavaScript errors that appear.
- Log into your Google API keys console and check to see if any data limit or other error messages appear that would indicate a problem with your API key.
If none of these steps seem to point to the source of the problem, please share the exact shortcodes you are using to display the map and marker on these community posts.
I emptied the site cache, and I also tried deleting the cached geocoding data from the Toolset Maps settings page you mention. No JS errors. I also checked the Google Cloud API page for errors, none there.
Again, all other location markers seem to be working fine... And this location's map loads in the dashboard, so Toolset is getting the correct lat & long of the address, it's just not including it on the front end. I'm placing the marker on a map in two places; on the 'find a home' page, and the individual community page. All other communities are working fine.
These are the shortcodes in the single community template:
[wpv-map-render map_id="map-1" map_height="350"]
[wpv-map-marker map_id="map-1" id="[wpv-post-id]" marker_id="marker-[wpv-post-id]" marker_field="wpcf-address"]
Your shortcodes look okay to me. What if you change this Community's address to something else temporarily, like 1600 Pennsylvania Avenue Northwest, Washington, DC? Is the marker shown in the correct location with a different known address?
I just tried "1600 Pennsylvania Avenue Northwest, Washington, DC" and again, the map and address load fine in the dashboard, but don't show on the front end. Bizarre.
Now I'm leaning towards one of these as the culprit:
- A server-side caching issue with a system like memcached, object caching, OPcache, etc. Sometimes those systems must be purged from a server control panel, and cannot be purged from wp-admin. Is your site hosted on WPEngine or Siteground, by chance? These two hosts have aggressive caching systems in place that might be causing problems here.
- A geocoding API key problem. Based on your previous information, I think this is unlikely but still a possibility. Just to confirm, you have gone to Toolset > Settings > Maps and clicked "Check API", correct? Everything checks out?
- A custom code conflict. This would be obvious if you deactivated all custom code in Toolset > Settings > Custom Code, all plugins except Toolset, and activated a default theme like Twenty Nineteen, and the problem was resolved.
The only caching the site is running is the WP Rocket plugin. Also, the problem exists within my local copy of the site as well, which isn't running any caching at all.
The API check in Toolset Maps settings returns "Google API seems to be configured properly."
We have nothing in the Custom Code tab of the settings.
I just tried deactivating all other plugins and switching to the TwentyNineteen theme on my local site, and the problem persists. Same issue - all other communities show on the map fine.
I'm out of ideas. Let me know if you need an admin login to the site.
Okay yes, I would like to log in to wp-admin and create a site clone using the Duplicator plugin. This will let me install a copy of the site locally and run more in-depth tests. If that's okay, please provide login credentials in the private reply fields here.
Looks like a field slug issue. In the map marker shortcode, the address field slug is "wpcf-address", but in the Field Editor you can see the field slug is actually "community-address". So the shortcode should use "wpcf-community-address". Was this:
[wpv-map-marker map_id="map-1" id="[wpv-post-id]" marker_id="marker-[wpv-post-id]" marker_field="wpcf-address" ...[/wpv-map-marker]
Should be this instead:
[wpv-map-marker map_id="map-1" id="[wpv-post-id]" marker_id="marker-[wpv-post-id]" marker_field="wpcf-community-address" ...[/wpv-map-marker]
I'm not exactly sure how this is working for some Communities, unless the field slug was recently changed. Regardless, you must change the map-marker shortcode to point to wpcf-community-address, then if other Community markers don't appear on the map you may need to edit and re-save those Community posts to update their address field.
Crap, I knew it was going to be something simple. The wpcf-address field is legacy content that obviously still exists in the DB. Thanks for your help!