doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 10 forks source link

lat and long not saved in the backend #96

Closed paolocoppo closed 1 year ago

paolocoppo commented 1 year ago

Craft CMS Pro 4.5.3 Google Maps 4.3.5

Other active plugins:

Active Google APIs:

Google API keys (2x) are set and added to the plugin (via env vars) For now, the two keys have no restrictions. From the plugin: Test the Google API keys -> both keys are valid

In the backend, when I save an entry that has the Address field, the lat and long are not saved. No js errors in the browser console. Checking console.cloud.google.com shows that there are calls to:

Any idea about was is wrong? TIA

lindseydiloreto commented 1 year ago

Hi @paolocoppo,

This is a tough one to diagnose, everything you are describing sounds correct. I can't recall a case where only latitude and longitude were being omitted from the resulting data.

Would you mind pinging me on Discord (@lindseydiloreto) when you get a chance? We can troubleshoot it together to figure out what the issue is, and report our findings back on this thread.

paolocoppo commented 1 year ago

Hi @lindseydiloreto, this is now solved and it was a user mistake, more or less.

I have used this plugin with a few Craft 3 installs, and it always works. Note that in Craft3, in Address field -> Subfield Manager -> Street Address I had the "Auto" checkbox unchecked. And all works.

In craft 4, that checkbox MUST be checked, then all will work.

Not sure if there is a bug in either version, but at least I can have the plugin fully working in both craft versions.

paolocoppo commented 1 year ago

closing as it's resolved

lindseydiloreto commented 1 year ago

Ok great, glad you got that resolved! Sounds like it might have been an edge-case bug in the Craft 3 version.

Since it's a relatively minor bug and Craft 3 is nearing EOL, we probably won't bother fixing it. But regardless, thanks for the full explanation! 🙂