Map not loading with Autoptimize
This topic contains 16 replies, has 3 voices, and was last updated by adyp 7 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
April 2, 2018 at 6:37 pm #424627
Hello,
I am trying to set up Autoptimize to work with WP Super Cache. I have followed the instructions for Autoptimize settings in the documentation (including js to exclude), but something is stopping the maps loading and the ‘near me’ button working.login to follow …
April 2, 2018 at 6:43 pm #424629This reply has been marked as private.April 3, 2018 at 1:05 am #424672I de-activated Autoptimize, I’ll get Stiofan to have a closer look.
It also seems you changed to HTTPS without changing your authorized URL in your Google API settings, see step 11 of https://wpgeodirectory.com/docs/add-google-api-key/
Thanks
April 3, 2018 at 7:40 am #424696Having just been about to start to work on my site I been left with a mess this morning! 🙁
No contact forms, no social shares, widgets in the wrong place because I have lost widget visibility controls – and that is what I have noticed in the first 5 minutes. I guess you turned all plugins off and then back on. Unfortunately I have lost a whole load of configuration – most probably in Jetpack, which has lost all settings and some functionality (even when Jectpack re-connected) – but not sure that explains my loss of contact forms. Unfortunately, also, I see my last automated database backup was approximately 20 minutes AFTER all this was done – meaning if I want to go back a further 24 hours to get my site functioning as it was then I will have to work out what work I did yesterday so that I can copy pages/arrange to reconstruct work (media file uploads etc). It is depressing that I know I will have to spend some time (hours maybe) on this right now when I already had a busy day lined up! To say I am not happy this morning is an understatement!!!
Moral of the story: regular backups are not enough, I will have to remember to run a back up every time I ask for support to insure against this sort of thing happening. I had thought that all was required was an indication of a script or two to add to the ignore options in Autoptimize setup – not this 🙁
Now, you said:
It also seems you changed to HTTPS without changing your authorized URL in your Google API settings, see step 11 of https://wpgeodirectory.com/docs/add-google-api-key/
I can see nothing in the link you provided – step 11 or otherwise – that mentions https. Do I need to set it up again? I am not even sure of the significance of what you said: the site was functioning fine to my knowledge.
April 3, 2018 at 7:58 am #424698ok – panic over – I managed to get it all back 🙂 – not a nice way to start the day though! I realise “turn all the other plugins off” is the stock advice given. But maybe not the first option to be tried in the case of Jetpack!
I’d still like some direction about the https/Google API issue. Is it significant? What do I do to remedy it – does it even need a remedy if google map appears to be working ok (except in case of Autoptimize)? (the link does not mention https)
Thanks,
AdrianApril 3, 2018 at 8:22 am #424699This is the warning you get on every page:
Google Maps API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-keySo I am guessing the site is authorized for the HTTP URL and not the HTTPS URL. Step 11 shows you were to change the authorized URLs.
I will leave the rest with Stiofan.
April 3, 2018 at 8:59 am #424707Looking at the API as per step 11 in the guide you linked to, I had the key restriction set to ‘none’ – so it should have been authorised for http and https. I have now set the key restriction to ‘http referrers’ (there is no option for httpS referrers) for my website as suggested in the documentation step (i.e., *.loopyfood.net/*). The * at the front should cover http and https?
Is this what you mean? I don’t know how to see if there are still errors. Or I need to generate a new API key after changing to https and delete the previous keys?
April 3, 2018 at 8:59 am #424708Am i still needed?
Stiofan
April 3, 2018 at 9:02 am #424709Hi Stiofan,
I am not sure – see my previous message which crossed with yours.
Also, there is the outstanding issue of autoptimise issues set out in my initial post (a case of scripts that need to be included in the autoptimise settings?)
Adrian
April 3, 2018 at 9:25 am #424714… and now my maps aren’t loading!
April 3, 2018 at 10:33 am #424730Now the Google API is definitely wrong, see https://wpgeodirectory.com/this-page-didnt-load-google-maps-correctly-see-the-javascript-console-for-technical-details-fix/
I checked how you entered the key and it had a space in front and the back, but that is not the issue.
The error you now have isGoogle Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: https://loopyfood.net/the-organic-food-directory/me/I suggest you create a new one.
April 3, 2018 at 10:55 am #424741ok – I have created and set new API and all appears well – I am just now checking if this removes the issue with Autoptimize not loading maps …
April 3, 2018 at 11:13 am #424743The problem remains as with my original post: setting up Autoptimize (following GD documentation) means that the maps do not load.
Also, there are formatting changes introduced (larger font in text, menu, sidebars and funny symbol above ‘st’ in text) – though that appears to be a different problem.
April 3, 2018 at 12:18 pm #424769I unticked the “Add try-catch wrapping?” and it now seems to work.
Stiofan
April 3, 2018 at 12:59 pm #424780There is still something funny going on.
The fonts all seem to be a bit bigger in main text, on menu and in sidebar, with the funny symbol above ‘st’ in the text. Strangely, the gd home (directory) page seems to correct itself after a second or two:
If you go to the home page, look at the words ‘listing’ and ‘lifestyle’ in the first paragraph (and observe the size of the menu writing). Then navigate to ‘Directory/Map’ on the main menu – the font size will be initially the same and the funny symbol will be above the st in the word ‘Just’ in the first para below the search bar. After a second or two the fonts get smaller in text and menu – and the word ‘Just’ and other st’s in text lose their funny symbols! – Then navigate to ‘Community’ on the main menu and the fonts get bigger again, with loads of funny marks – see the bottom half of the first paragraph. The problem doesn’t right itself on this page.
Something weird going on.
Interestingly, the st symbol does not appear in page headings.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket