jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Contact Info/Map Widget: Better Error Messaging

Open abcxyz-m opened this issue 8 years ago • 41 comments

Summary

On self-hosted sites (doesn't seem to impact WPcom *) the Contact Info/Map widget is not accepting any address. This includes the default address shipped with the plugin:

Image Link: http://cld.wthms.co/z2lJQW

Tested using an unrestricted API key with access to the Maps Embed API:

Image Link: http://cld.wthms.co/2xRH1O

NOTE: Since I'm posting this in the public repo, I've regenerated both API keys. They're no longer valid.

Bug replicated across different platforms:

  • Pressable
  • Atomic
  • Self-hosted (Google Cloud Platform)
  • A user's site

Unclear if this has an impact on existing widgets that already saved the address. Didn't have any to check on.

* WPcom-specific stuff; check here, there's another oddity:

  • p1539903252000100-slack-jpop-support

Internal ref: 1494815-zen

abcxyz-m avatar Oct 18 '18 23:10 abcxyz-m

When initially signing up for a Maps API key, following Google's instructions (that we link to), you're presented with these options...

Image Link: http://cld.wthms.co/JJXLsa

You must also select Places, so that the Geocoding API is included. Otherwise, the widget won't work:

  • https://developers.google.com/maps/documentation/geocoding/start

The Geocoding API is a service that provides geocoding and reverse geocoding of addresses.

I'll update the affected user and we'll work on updating our docs to make this "gotcha!" clearer.

abcxyz-m avatar Oct 19 '18 00:10 abcxyz-m

Reopening to enquire if there's any way we can detect if the key does not have the Geocoding API enabled, or at least give a hint in the widget that that could be the issue.

danjjohnson avatar Oct 19 '18 09:10 danjjohnson

It may be possible. There are a number of status codes the API will return that would indicate some type of key error https://developers.google.com/maps/documentation/geocoding/intro#StatusCodes

We probably could at least pass the error message through.

kraftbj avatar Oct 19 '18 19:10 kraftbj

1506303-zen

Error Message - update it here so this issue is more searchable:

Sorry. We can not plot this address. A map will not be displayed. Is the address formatted correctly?

htdat avatar Oct 29 '18 08:10 htdat

1506303-zen

@mzakariya - When working on this ticket, I've tested more than one time and in my testing, I just need to choose Maps without Places, the key is still working for me.

htdat avatar Nov 06 '18 02:11 htdat

1548677-zen

arunsathiya avatar Nov 07 '18 15:11 arunsathiya

Another case in the dotcom forums.

KokkieH avatar Nov 27 '18 05:11 KokkieH

1644371-zen

abcxyz-m avatar Dec 18 '18 16:12 abcxyz-m

1668616-zen

brezocordero avatar Dec 26 '18 15:12 brezocordero

Looking at Google's documentation you must now enable Billing to get this API to work https://developers.google.com/maps/documentation/geocoding/usage-and-billing

google billing info from https://developers.google.com/maps/documentation/geocoding/usage-and-billing

(Image link: http://cld.wthms.co/WkRcWC )

azollafox avatar Dec 26 '18 19:12 azollafox

1674153-zen

erricgunawan avatar Dec 29 '18 03:12 erricgunawan

1699926-zen

erricgunawan avatar Jan 09 '19 01:01 erricgunawan

1692948-zen

htdat avatar Jan 09 '19 09:01 htdat

1707581-zen

ezebecke avatar Jan 10 '19 16:01 ezebecke

1727750-zen

erricgunawan avatar Jan 18 '19 10:01 erricgunawan

Chat: 6131015-hc Follow-up: 1771283-zen

Robertght avatar Feb 04 '19 05:02 Robertght

I replicated the issue on the Atomic site where the address show the error Sorry. We can not plot this address. A map will not be displayed. Is the address formatted correctly?. Whereas for the same address and API, works fine on a simple site.

Chat: #10083042-hc Ticket: #1776470-zen

galakhyati avatar Feb 05 '19 14:02 galakhyati

Chat: 10139652-hc Follow-up: 1783357-zen

nielslange avatar Feb 07 '19 11:02 nielslange

1777442-zen

interlineae avatar Feb 11 '19 12:02 interlineae

#1835564-zen

kosiew avatar Feb 27 '19 09:02 kosiew