MAP api is wrong

About Support Directory MAP api is wrong

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #2777
    Avatar for chrispriorchrisprior
    Participant

    I am always getting the error ‘One of the parameters of your Google MAPS API request is wrong’
    The error in the java script is:

    admin.php?page=church_admin%2Findex.php&action=edit_household&household_id=61&_wpnonce=eafa61440c:1 The SSL certificate used to load resources from https://www.breadsallchurch.org.uk will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.
    admin.php?page=church_admin%2Findex.php&action=edit_household&household_id=61&_wpnonce=eafa61440c:1 The SSL certificate used to load resources from https://www.paypal.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.
    load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.4:9 JQMIGRATE: Migrate is installed, version 1.4.1
    maps.js:5 Uncaught ReferenceError: beginLng is not defined
    at HTMLDocument. (maps.js:5)
    at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.4:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.4:2)
    at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.4:2)
    at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.4:2)

    Any thoughts?

    #3927
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    Thanks for posting the error, I can see your problem immediately!
    beginLng is not defined

    Go to Church Admin>Services and set an address for a site where your services are held. That is then assumed to be the centre-point of all your maps.

    I should get the plugin to look for an address in the directory as centre-point if no site has been specified.

    #3928
    Avatar for chrispriorchrisprior
    Participant

    That doesn’t seem to be the problem. The location of the services was already set. I have only 1 site shown and that definitely has an address set.

    #3929
    Avatar for chrispriorchrisprior
    Participant

    I just updated the plugin but the error is still occurring. I wonder if it relates to the SSL certificate and Google not responding due to the error. I have logged a ticket with the hosting company (freeola) to see if the ssl cert can be updated.

    #3930
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    That ssl error is to do with Paypal not your site. Your SSL expires end of May.

    Go to the edit household page and right click, view source. Then CTRL F and type in “var beginLng =” without the “”!
    If nothing shows then that’s the issue, which is what the error is reporting.

    #3931
    Avatar for JosteinJostein
    Participant

    I do have the same issue; “The API is wrong” I’m not able to find “var beginLng =” but “var beginLat =” is present with a value of 51.50351129583287-0.148193359375. I do not know if this informaton do have any relevance.

    #3934
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    Just to clarify is this only happening when you are editing a household where the address geolocation has not been set before? (In other words, the map pin hasn’t been set)

    #3935
    Avatar for JosteinJostein
    Participant

    For me this is happening when I open a household and the geolocation has been set. Under the address line I see this message: “Your Google Map API key is missing, wrong, or not enabled for Static maps”
    In “Edit address, landline and/or photo” the map is appearing just fine.

    #3936
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    I fixed one issue which was to do with that beginLat variable (on Jostein’s site and my home server etc). That’ll be in the next update.

    But the map still isn’t showing on Jostein’s site on pages where a static map is used.
    I don’t think it is a Church admin bug anymore – it’s to do with your api key.
    Can you check on https://console.cloud.google.com/apis that the Static map api is enabled.

    #3937
    Avatar for chrispriorchrisprior
    Participant

    Another possible problem – mixed http and https. I have moved my site to https but the api call is using http.

    Failed to load resource: the server responded with a status of 403 ()
    admin.php?page=church_admin%2Findex.php&action=edit_household&household_id=60&_wpnonce=b40f908aee:374 Mixed Content: The page at ‘https://www.breadsallchurch.org.uk/wordpress/wp-admin/admin.php?page=church_admin%2Findex.php&action=edit_household&household_id=60&_wpnonce=b40f908aee’ was loaded over HTTPS, but requested an insecure image ‘http://maps.google.com/maps/api/staticmap?key=AIzaSyDq1OaXZolIJ347j_jlZzXgp9Cb_ffzy00&center=52.9561767,-1.45159799999999&zoom=15&markers=52.9561767,-1.45159799999999&size=500×300’. This content should also be served over HTTPS.

    The previous error I reported has gone.

    #3944
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    I’ll make sure google image requests happen from https:// from next update

    #4002
    Avatar for Jon B
    Guest

    So you have to have “https://console.cloud.google.com/apis/dashboard?project=friendly-church-1530307519286&folder&organizationId&duration=PT1H” established in order to utilize Google Maps API Key?

    Sorry I litterally started playing with it about two hours ago.

    -Jon.Cool

    #4003
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    That link will only work for you. Google changed the process a few weeks ago. More details are at https://www.churchadminplugin.com/tutorials/google-map-changes-july-2018/

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.