Forum
Using Maps fails on windows server
I have a site with three maps on the contact page. Perch is updated to Perch: 2.8.31.
Page works fine on a linux staging server. However when moved to the clients live server (windows) the maps fail.
The maps view initially and then disappear with an error "this page didn't load google maps". Console says...
Google Maps API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
And ideas on a fix?
Perch: 2.8.31, PHP: 5.6.24, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /homepages/45/d180427405/htdocs/mor073/cms
PERCH_CORE: /homepages/45/d180427405/htdocs/mor073/cms/core
PERCH_RESFILEPATH: /homepages/45/d180427405/htdocs/mor073/cms/resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 64M, Memory: 256M, Total max file upload: 64M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: moreukltd.co.uk
DOCUMENT_ROOT: /kunden/homepages/45/d180427405/htdocs/mor073
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Have you added your API key to the config file?
Ah! Do I need to do this? I don't recall ever doing this on any other Perch site. As in, the same code works on the linux staging server.
...no wait the staging server does not. But other Perch maps on other site do with no API key for want I can see.
I fixed the issue on the staging linux server by re-saving the map locations in the editor control panel.
Hopefully thought re-saving same would fix the windows server too. The unlike the linux server the widows server maps there do not display at all in the editor control panel with the first error...
and then
Now is that an issue with the server not allowing the map to load first and then the API key fails?
Why would the linux server working and windows server not.
Have you now added your API key?
https://docs.grabaperch.com/docs/templates/attributes/type/map/
Yup, got it. With a whole load of Google jiggery pokery. Works now.
You can thank Google for that one.