• Resolved Mark Wilkinson

    (@wpmarkuk)


    Hi there – I am having a very strange issue with the Geo location data being captured when a job is created in WP admin.

    I have added my API key into the settings screen and restricted this to the servers IP address.

    Sometimes for jobs it saves the location data no problem, and sometimes the data is not saved.

    It seems some places it will never save the data for and some places it will.

    This is really strange and my first thought was an API key issue. However the fact that it does save data sometimes means the key must be fine.

    I am really at a loss as to what to try and next and wondered if anyone had any inspiration.

    Many thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi! As a first step, can you share a link to one where it worked, and where it didn’t work? Thanks!

    Thread Starter Mark Wilkinson

    (@wpmarkuk)

    Hi Richard,

    Thanks so much for coming back to me on this.

    This job I cannot get the API to save any data when entering “Kent, UK” as the location:

    https://jobs.strata-recruitment.co.uk/job/senior-civil-engineer/

    However this job has the same “Kent, UK” entered into the location when saving the job in the backend and the geo data is added:

    https://jobs.strata-recruitment.co.uk/job/structural-design-engineer-4/

    Plugin Contributor Richard Archambault

    (@richardmtl)

    That’s very odd! Is there any difference in how they were created? You mentioned “when saving the job in the backend and the geo data is added”.. Can you provide more details about how these jobs are being created, exactly?

    Thread Starter Mark Wilkinson

    (@wpmarkuk)

    Both were written in the WordPress admin area by clicking on Job Listings > Add new and then publishing the job.

    Thread Starter Mark Wilkinson

    (@wpmarkuk)

    Just thought I would post an update on this.

    I have just been looking at this by create a new test job. If I enter into the location field, “Kent, UK” and click publish, I get job location data saving against the job (I can see this in the custom fields section on the post edit screen).

    If I then change the location to “Hull, UK” I get no geolocation data saved. I then tried adding a third location string change of “Manchester, UK” and again I got all the data saved no problem.

    Very strange.

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @wpmarkuk ,

    Sorry for the delay in responding here! Not sure if you’ve resolved this issue, but this:

    Both were written in the WordPress admin area by clicking on Job Listings > Add new and then publishing the job

    can cause issues. Several verification steps are not taken when adding a job via the Job Listings > Add New path in WP Admin. Problems could present as missing geolocation data, It also creates issues with structured data.

    Please try adding or editing jobs through your frontend form, and let us know if the problems persists.

    Best,
    Cena

    Thread Starter Mark Wilkinson

    (@wpmarkuk)

    Thanks so much for coming back to me. I have now just tested this using the frontend submission form (which won’t actually work for us but we can solve that after!) and the same happens.

    I have entered “York, UK” into the location and no location data is saved with the job.

    Thread Starter Mark Wilkinson

    (@wpmarkuk)

    Further information on this.

    I did some debugging by outputting the result of the wp_remote_post call to the Google maps API for geocoding. It responded in a result of an error about the sites IP not being allowed. Adding this the whitelist in the API settings corrected this error.

    However, re-saving already published jobs does not grab the geo location data again. Add new jobs works fine.

    Any ideas on how I can get the geo location request to the Google API to fire for a post save as well as a post publish?

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @wpmarkuk ,

    I’m not able to duplicate this.

    I created a job for Kent, UK. It displays the geolocation fine:

    KentUKgeo

    In the post edit screen, I then updated the location to Hull, UK, and that updated:

    HullUKgeo

    So I’m rather stumped here. Is it possible you may have some sort of server or site caching that may be causing this?

    Best,

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Geo location data intermittent issue’ is closed to new replies.