luclessard

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • luclessard
    Participant

    I found the problem and it’s somewhere in your code. Well it’s only missing a dedicated serverside API key soo the server can call the google API directly.

    You see, when we create the API key in the google console, we have to protect it and assign an “Application Restriction” in most case a typical user should use the setting: “HTTP referrers (web sites)” and that’s what my api was setup for to prevent anybody from abusing from it.

    But in our case, when Events Calendar Pro goes to fetch the geolocation of the address in the Venues, its the “SERVER” that calls the Google Maps API so thats where it halts with an “ACCESS DENIED”, because Google’s API expects the call to come from a Browser… Not a server.

    To Correct it, i had to “Remove” the Application Restriction in the Google API key setup and set that to none… Which is UNsecure and kinda scary.

    Can your developers check that urgently please ?

    It’s in the file events-calendar-pro > src > Tribe > Geo_Loc.php
    On line 575, it uses the API for the end user when it should use a key dedicated for server to google api calls.

    In the mean time, I hard coded another API key on the server side and set its “Application restrictions” to IP Address so the server can call google without any trouble

    Luc

    luclessard
    Participant

    Any news?

    The button you told me to press “Fix venues data” doesn’t exist or it’s somewhere else ? (maybe a change in the ui)

    I hope it’s the answer, my projet is stalled because of this problem and the deadline is arriving soon.

    Thanks for the help

    Luc

    luclessard
    Participant

    Hi Jeremy, thanks for the support

    So here are my answers :

    did you add your API key under Events –> Settings –> APIs?
    Response: Sure did, checked and re checked, and no errors in the javascript console.

    could you try to “Fix venues data” by clicking on that button in Events → Settings→ Map Settings?
    Response: I can’t see this option nowhere…. take a look at the screenshot i attached.

    if that doesn’t change anything, could you use coordinates in Events → Venues? (edit one of the venues – you will find an option to use latitude and longitude coordinates)
    Response: I use the coordinates on one of the venues and the pointer appears on the map, but i can’t use the coordinates option since the venues will be manage by someone else (techno noob) and it needs to be as easy as possible like using the address and zipcode. Strange that the address in the venue options don’t work but works directly on maps.google.com ?

    Thanks again.

    Luc

Viewing 3 posts - 1 through 3 (of 3 total)