Home › Forums › Calendar Products › Events Calendar PRO › Location Search throwing errors
- This topic has 7 replies, 2 voices, and was last updated 10 years ago by
Nico.
-
AuthorPosts
-
May 11, 2016 at 10:21 pm #1113609
Derek
ParticipantI just Purchased events calendar pro today because I critically need the location search for my calendar/events page. if this feature does not work then the calendar is essentially useless to me.
when trying to do a location search, I enter a city name (doesn’t matter what city, or from where, or if it is the capitol of the united states or Canada) hit search, and instead of it doing the normal search action it does nothing. if I remove the city name from the location search it will then search based on the other criteria.
I have looked through the troubleshooting documents you provided and disabling the other plugins does not fix the issue and neither does switching themes.
if I inspect element in my browser and click the search button with a city in the location field I get 2 warnings from entering a city in the location field and 1 error when I click the find events button.
Warnings:
-Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
-Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-requiredError:
InvalidValueError: in property bounds: not a LatLngBounds or LatLngBoundsLiteral: unknown property HWhat can we do to resolve this issue? I have also deactivated the events calendar and events calendar pro plugins and reactivated them just to see if that made any changes.
May 12, 2016 at 7:32 am #1113741Nico
MemberHi Derek,
Thanks for reaching out to us on this! I’ll help you getting this right…
The warnings you see shouldn’t be the cause of the issue, but the error might be. Can you please the site URL where I can see this? Also, Do you have at least one event (venue really) with valid address, city and country? If not, try creating one and assign it to an event…
Please let me know about it,
Best,
NicoMay 12, 2016 at 7:55 am #1113760Derek
ParticipantSite is hidden and in development mode unfortunately. I have 3 or 4 events created and have given them venues with existing actual addresses. That was the first thing I did before testing the search function. I also made sure that at least one of the events was in a city in the US and the rest were in a city in Canada so that I would be able to tell if the search was returning accurate results.
after starting this thread I found the above thread about the change in google’s api. the warnings pointed me to this thread. it sounds like my issue could be related to this? is there an estimated release date for the update that would resolve this issue and allow me to enter my API key through the plugin’s gui interface? I looked at the solution listed in this thread but my version of the php file in the events calendar pro does not include the line of code that they are mentioning.
May 12, 2016 at 6:29 pm #1114098Nico
MemberThanks for the follow-up and also for pointing to the other thread.
You can give this snippet that Kristi suggest a try, just add the snippet to your functions.php file:
add_filter('tribe_events_google_maps_api','google_api_key');function google_api_key() {
return '//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY';
}
I’m not sure if this might be related or not but hopefully we will be able to narrow down the issue a bit more.
Thanks,
NicoMay 12, 2016 at 10:31 pm #1114127Derek
ParticipantHello, adding that to my functions.php file did not solve the issue, it still throws the no api keys found warning and same error when searching. I did notice that if I watch console while refreshing the calendar page I get a “You have included the Google Maps API multiple times on this page. This may cause unexpected errors.” error early on followed by the warnings and errors when I try to search with a city name. I also tried assigning the calendar to a new page name that does not exist in my list of pages and I receive the same multiple google maps api error with the new url being used.
the order for the lines you wanted me to ad to the functions.php file should be as follows though:
function google_api_key() {
return ‘//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY’;
}
add_filter(‘tribe_events_google_maps_api’,’google_api_key’);the way you had it throws a syntax error and the whole website won’t load at all. reversed the order and then there was no issues loading the website. but I still had the calendar search problem.
Will there be an update to the events calendar released soon that solves this issue? the other forum mentioned a update being release to fix it, I assume with a tab to input the google api key that the user generates themselves. I’m just getting concerned since I spent a fair bit of money simple to have the one feature that we can’t seem to get working yet.
May 16, 2016 at 2:29 pm #1115129Nico
MemberThanks for following up Derek, and sorry to hear this is still an issue.
Please note that you need to input your API key in the snippet I sent you over. Also, the warning “You have included the Google Maps API multiple times on this page. This may cause unexpected errors.” might indicate the source of the issue. Can you please follow the steps described in our Testing for conflicts guide? Generally this error pop-up when the theme or other plugin is including the maps API as well, de-activating other plugins other than ours, and switching to default theme should prevent this.
Regarding having a UI to input the GMaps API Key, that’s scoped for next feature release 4.2 coming out in a couple of weeks.
Best,
NicoMay 17, 2016 at 1:12 pm #1115601Derek
ParticipantThanks for getting back to me. I have tried going through the help files and forums again and finally tracked down the plugin that was causing the multiple google api instances on that page. with that plugin disabled it no longer gives that error, and the calendar location search now works.
I’m guessing that with the next release of the events calendar, inputting my own key and having it set through the plugin will make it function much more consistently more consistently with other plugins. I look forward to the updated versions release.
Thanks for your help with this.
May 17, 2016 at 4:39 pm #1115675Nico
MemberThanks for the heads-up Derek! Be sure to test this after the update to version 4.2 🙂
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘Location Search throwing errors’ is closed to new replies.
