• Resolved xvarea

    (@xvarea)


    Hello,
    All of a sudden my customer’s website, which was fully working until a few weeks ago, stopped validating address.
    They usually insert the address in an ‘address’ field, which is then validated, and outputs the ‘city’ on the property page.
    This has always been done without google maps API, so I tried setting an API key, but it didn’t change a thing.
    Any hint? Anyone else experiencing similar problems?
    Thanks in advance.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    Over a year or even 2 years ago Google forced to use Google Maps API keys. From WP-Property 2.0 we added that ability. You need to set up keys and enable that API in your google account.

    Regards.

    Thread Starter xvarea

    (@xvarea)

    Hello Maria,
    I tried but I still have some problems:
    Once inserted the API Key the address autocompletes with zip code, nation, etc. the map seem to work, but the ‘city’ field isn’t autopopulated as expected. I also tried revalidating alla addresses in the ‘Help’ tab, but it didn’t work. Any suggestion?

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Can you be more exact what do you see when trying to revalidate in Help tab?

    ‘city’ field isn’t autopopulated as expected.

    It is not populated at all? Check the slug of the attribute which you put in Developer tab. Here are examles which can be used:
    ‘formatted_address’, ‘street_number’, ‘route’, ‘district’, ‘city’, ‘county’, ‘state’,‘state_code’, ‘country’, ‘country_code’, ‘postal_code’

    Regards.

    Thread Starter xvarea

    (@xvarea)

    Thanks Maria,

    Can you be more exact what do you see when trying to revalidate in Help tab?

    Yes, in Properties>Settings>Help there’s a line “Revalidate all addresses using English localization” with a ‘revalidate’ button.

    The city field’s slug is ‘city’.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    I mean what happens when you push that button?

    Thread Starter xvarea

    (@xvarea)

    Elaborates for a while, then no change appears in the properties.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    How many properties do you have? That button is starting the process of revalidating addresses on your site and when that process finished you should see some message like how many property addresses were revalidated or that there were some issues to revalidate addresses.

    Thread Starter xvarea

    (@xvarea)

    Hello Maria,
    Validation does work now (and so does autocomplete). But still the city field stays empty.
    I tried to remove the field ‘city’ and re-create it, but to no avail.
    I have more than 500 properties. After revalidation I only get the message ‘revalidate again’ with no error or success indication, however my ‘address’ field in the property edit page shows correctly (and correctly formatted according to the language I’ve chosen before starting revalidation) and the location on the map is correctly shown (in the backend, I don’t use it on the frontend).
    How about creating a ‘formatted_address’ field in the developer tab to check if that is populated?
    UPDATE:
    I tried to create the ‘formatted_address’ field, and it appears to be empty (except for properties which were updated before it stopped working – which of course also have the ‘city’ field populated).

    Thanks

    • This reply was modified 7 years, 7 months ago by xvarea.
    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    @xvarea Can you send me the link to the property where that does not work or can you check for any error in your console on that page.

    Thread Starter xvarea

    (@xvarea)

    @mariakravchenko do you mean in the frontend?
    But the problem occurs in the backend…
    anyway here we go:
    http://www.agenzia-domus.com/en/properties/
    all of the properties where the city isn’t shown between the title and the price do have the problem.
    In the single property page the console warns me that I have used the same API multiple times in the page (the API’s used to create the multi-pinned map in the footer for the agency’s physical offices) and then

    `Uncaught TypeError: Cannot read property ‘firstChild’ of null
    at Object._.pe (js?key=***myAPIkey***&ver=4.9.8:71)
    at new Og (js?key=***myAPIkey***&ver=4.9.8:110)
    at initialize_this_map ((index):234)
    at HTMLDocument.<anonymous> ((index):219)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at Function.ready (jquery.js?ver=1.12.4:2)
    at HTMLDocument.K (jquery.js?ver=1.12.4:2)

    Can that be the problem? I tried to create a new API key to use a different one but it doesn’t seem to work.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    I know that this error could cause the issue

    You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.

    It seems your theme also using Google Maps requests which are old or in the wrong way included.

    Regards.

    Thread Starter xvarea

    (@xvarea)

    I temporarily disabled the multi-marker map for troubleshooting, and finally I got a clear error message on revalidation:

    433 properties were ignored: quota exceeded

    It looks like Google wants my customer to pay for address validation, which is not something I can even propose to them.
    I think I’ll just disable address validation completely and make ‘city’ a manually filled field. Not an ideal solution, but the alternative isn’t ideal either.
    I’m posting this for others who might be in a similar situation, however any other hint or suggestion for a workaround will be appreciated.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Address Validation suddenly stopped working’ is closed to new replies.