Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • 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.

    Thread Starter xvarea

    (@xvarea)

    @mariakravchenko do you mean in the frontend?
    But the problem occurs in the backend…
    anyway here we go:
    https://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.

    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 6 years, 1 month ago by xvarea.
    Thread Starter xvarea

    (@xvarea)

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

    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’.

    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?

    xvarea

    (@xvarea)

    Hello everyone. It didn’t work for me until I realized that the problem were with custom post names:

    https://example.org/es/libros/post-type-name/

    with ‘libros’ transliterated to latin characters everything works, but if the general name for the custom post type is in cyrillic, it doesn’t.

    I’m posting this in case somebody has similar problems.

    xvarea

    (@xvarea)

    I have the same problem on my test installation:
    – works on pages
    – works on articles
    – doesn’t work on custom post types
    – in one case doesn’t even lead to 404 but to a list of articles, which is quite unexpected.
    I suspected it had to do with the way the custom post type is registered, since I was working with a plugin generated (wp-property) custom post type. So, to better troubleshoot the issue, I registered a ‘test’ custom post type with simple code in functions.php. Still doesn’t work, and more exactly:
    – with ‘properties’ custom posts (generated by ‘wp-property’ plugin) the slug leads to the list of articles (articles, not properties or other custom posts)
    – with ‘test’ custom posts (generated via code) I get 404ed.

    Any hint?

    Thread Starter xvarea

    (@xvarea)

    Thanks Elena, this was fully solved (thanks to your help by email after I gave you credentials of the TEST site).

    For everyone who might find this thread while looking up to solve the same problem:
    – Go in Settings>Developers
    – Delete your address field (take note of the field’s slug)
    – Re-create your address field as new
    – if your properties DB is empty, check that the slug is ‘address’ as this is wp-property default. If your previous address field had a different slug, and you already populated your properties DB (by manual entry or import), make sure that the slug is the same as it was before deleting: this way you’ll have all your data back in place.
    – Check that your newly created field is set in Settings>Main>Automatic Geolocation. Note that if you didn’t delete and re-create the field this setting alone is is not a warranty that it will work.

    Sorry for being one month late on this, I didn’t check the forum in a while.

    There’s a paid addon for that, so I won’t put a copy-paste solution as it would be unfair towards the developers, however you can edit the user roles capabilities yourself. I’ve created a ‘property manager’ role who can only access blog posts and properties, so the real estate agency employees can create and edit properties without accessing webmaster-specific parts or being able to break something; you can also specify if the user can only edit his/her own posts/properties or other users’ as well. It doesn’t take genius level coding skills, so it’s up to you if invest a few hours of work (or a lot less if you’re already familiar with wordpress roles and permissions) and write a simple paragraph of code, or pay the developers (they already gave wp-property for free, they deserve it).

    Thread Starter xvarea

    (@xvarea)

    I couldn’t send you the credential for the actual site as my customer is quite paranoid (having their 200+ properties already uppped), but luckily (if we may call ‘luck’ an error occurring) the error is now occurring on the test installation as well. I recently included some file from the actual site in order to be able to code my property.php there instead of the production.
    TEST SITE: https://www.headquarterz.org/wp_prop/
    Production SITE: https://www.agenzia-domus.com/

    I’ll send you the credentials for the Test site: being incomplete it is a lot smaller and it might be easier to find the problem.

    P.S.: the test site doesn’t have a google maps API key, but the production site has it so it’s irrelevant.

    • This reply was modified 7 years, 9 months ago by xvarea.

    The listed solution is not viable in many cases, for example if you painfully imported a large database of properties from somewhere else.
    You could remove the add_square_foot filter, which is in the /lib/default_api.php
    Of course you should NEVER edit the plugin’s files: your changes might break something or btw be completely wiped from the next update. So just paste this snippet in your child theme functions.php :

    /* Change sq. ft. to m2 */
    
    //disable filter add_square_foot
    	function disable_add_sqft() {
        remove_filter( "wpp_stat_filter_area", 'add_square_foot' );
    }
    add_filter( 'wp_loaded', 'disable_add_sqft' );
    
    //create filter add_square_meter
    	function add_square_meter( $area ) {
      return $area . __( " m&sup2", ud_get_wp_property()->domain );
    }
    add_filter( "wpp_stat_filter_area", 'add_square_meter');

    This will override the function which appends sq. ft. to the area. Please note that the ” m&sup2″ bit stands for m2, but you can substitute that with any other notation or unit that you intend to use, such as ‘mq’ or ‘acres’ or anything else.

    • This reply was modified 7 years, 10 months ago by xvarea.

    Sorry I thought this were about wp-property.

    Comment deleted.

    • This reply was modified 7 years, 10 months ago by xvarea.
Viewing 13 replies - 1 through 13 (of 13 total)