Closed MoritzLost closed 1 year ago
Very interesting, thanks for reporting. Have you double-checked that your API keys are 100% valid?
https://plugins.doublesecretagency.com/google-maps/guides/test-google-api-keys/
@lindseydiloreto Yes, our API keys are completely valid and work normally except for this bug. When this issue doesn't occur, the address field and the map initialize normally and the autocomplete works correctly. And doing a full reload fixes the issue for that particular entry, so it's definitely related to the issues I linked, not to the API keys.
We've also never changed the API keys on that site, so it can't be something like the browser caching old API keys.
We've just released v4.3.6, which includes a cache-busting string on the Google Maps API URL.
It generates a new cache token every 12 hours, which aligns with this description of the problem and solution. Hopefully that does the trick! 🤞
Thanks again for reporting it! If you wouldn't mind, keep an eye on the problem over the next few weeks or months to be sure that our solution is working.
@lindseydiloreto Looks great, thanks!
We've updated to the new version and let the client know that the issue should be fixed now. I'll report back in case the problem still persists.
We're seeing an issue where the address field sometimes fails to intialize:
The console shows the following error:
This only happens with editors that have been using the CMS for a while. Reloading the page normally does not make the error go away. However, doing a full reload (
CMD
+SHIFT
+R
) does fix the issue for that entry, though not for others. So this is somehow related to browser caching.The error message is curious, it indicates that the Google Maps JS library was loaded from the wrong URL, but the plugin is not doing that. I found two thread on Stack Overflow that indicate this error can be related to an expired token that the browser may have cached:
Could a fix similar to the suggested solution there be implemented in the plugin? We've told the editors to to a full reload when this error occurs, but of course that's not ideal.