Google map key in event location issue
kevindherman opened this issue · comments
Source
Platform except City Template
Zendesk tickets:
- SR https://proudcity.zendesk.com/agent/tickets/6967
- Petaluma (few things in this one) https://proudcity.zendesk.com/agent/tickets/6931
Describe the bug
Event locations are displaying google map location not found error on all locations. It drops a pin on the front-end after people select "directions" button. However, it gives an alert on the back-end saying location not found that makes it seem like it's not working at all.
To reproduce
Steps to reproduce the behavior:
- Go to any event
- Click on edit
- Scroll down to location information
- See error
https://www.somervillenj.org/wp-admin/post.php?post=7637&action=edit
Expected behavior
It is working correctly on City Template, see: https://demo.proudcity.com/wp-admin/post.php?post=4676&action=edit]
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
@curtismchale I wonder if adding the google maps key as referenced in this issue to City Template has thrown things off for everyone else: #2384
Also we should delete this test from city template once @curtismchale has tested.
QA
Notes:
Links:
@curtismchale I see that the google map API browser key is empty in the updated version of events manager:
https://cityofpetaluma.org/wp-admin/edit.php?post_type=event&page=events-manager-options#
@kevindherman I've found the problem and submitted a support ticket. Ultimately there are no values for location_latitude
and location_longitude
for some older locations.
This can be fixed manually by going to the location and putting in any other address (to get the system to update the map) then changing it back to the address we want. It only needs to be done on the first line of the location. Once this is done the map should load and then we can save the location.
I'm going to take a bit to see if there is a way to loop through the locations and find the ones with no values for lat/long and then generate them.
@curtismchale super helpful. Would be really great if there was a way to resolve without the manual approach but good to know there is an option for the timebeing.
Random: Do you think the address issue could create a delay in auto-draft or publishing? Or is that completely unrelated?
@kevindherman I think it's unlikely that they're related.
@curtismchale are you able to do what you outlined for these event locations because I'm not having success:
@kevindherman both done. The API wasn't added under Event Settings and neither of the sites had their URL allowed for the API key so no API calls were going through.
I've fixed both of those locations and I'm still working on a proper fix for getting all locations and adding the lat/long information. I'd anticipate a custom plugin that would take 5 - 10 hours to build/test/deploy and run on all sites.
Very helpful. @curtismchale
Since this is a platform issue we may need to jump on it. Having said that, the new API is a way for them to track traffic and bill us.
Without the API key, the get directions button for the user drops a pin at the location. So it works, just doesn't embed the map and looks crappy for the editor who gets a message that makes it seem broken.
Lets talk through if it's worth the time and money for the embed vs just getting rid of the google maps error for admins.
@curtismchale in the interim, if I have other zendesk tickets about event locations, can I just add the same API key to their plugin settings and then direct them to update their location?
@kevindherman yes you can add the API key to their settings. They may also need to be added to the allowed domains for the API key here. Theoretically the domain is added as part of a site launch sequence but both of the sites in question were not added.