Store Locator Plus for WordPress Forums Store Locator Plus No Search Results Appearing

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #58177
    Adam
    Participant

    Hi,
    I have been trying with no avail to get Google Maps to do it job.
    I have created the API in the Google Console, copied it into SLP.
    I have tested it by changing the “Centre Map At” setting, and this is working.
    Our page is https://www.kelato.com.au/stockists/
    When I test the search, I can see in the Google Console that there is an API request for the “Maps Javascript API”
    The problem is that there are no results being returned when I search. SLP returns “Could not locate this address. Please try a different location.”
    The locations in SLP all have Lat/Long coordinates.

    This is what is in the Firefox console.
    Google JavaScript API geocoder failed with status ERROR results undefined slp_core.min.js:1:574

    Any advice on what to try would be much appreciated.

    Environment:
    Store Locator Plus®:5.0
    Experience:5.0

    Site URL:https://www.kelato.com.au
    This Info Cached:1545198312
    Network Active:No

    WordPress Version:4.4.17
    PHP Version:5.4.45
    MySQL Version:5.6.42

    PHP Limit:256M
    WordPress General Limit:40M
    WordPress Admin Limit:256M
    PHP Peak RAM:64 MB
    PHP Post Max Size:40M

    • This topic was modified 11 months, 3 weeks ago by Adam.
    #58186
    Cici
    Keymaster

    Did you also get the Google Geocoder key?  https://www.storelocatorplus.com/wordpress-store-locator-plus-google-api-key/

    When I go to the first url and use Browser tools/inspect/console the following errors come back.  I have no idea what a Google tag manager is. Also,  You need to debug your site, I am guessing that using version 4.4 .17 of WordPress , perhaps you have some plugin or theme using outdated jquery  or breakingSLP.

    Failed to load resource: the server responded with a status of 404 ()https://www.googletagmanager.com/gtm.js?id=GTM-N9D59MX

    /wp-json/store-locator-https://www.googletagmanager.com/gtm.js?id=GTM-N9D59MXplus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/3000Australia:1 Failed to load resource: the server responded with a status of 500 ()

    When I perform a search looking at the Network I also see this:

    VM30:1 GET https://www.kelato.com.au/wp-json/store-locator-plus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/3001Australia 500

    (anonymous) @ VM30:1

    send @ jquery.js?ver=1.11.3:5

    ajax @ jquery.js?ver=1.11.3:5

    m.(anonymous function) @ jquery.js?ver=1.11.3:5

    getJSON @ jquery.js?ver=1.11.3:5

    geocode @ slp_core.min.js?ver=1545006973:1

    doGeocode @ slp_core.min.js?ver=1545006973:1

    searchLocations @ slp_core.min.js?ver=1545006973:1

    onsubmit @ (index):351

    #58187
    Cici
    Keymaster

    Did you also get the Google Geocoder key?  https://www.storelocatorplus.com/wordpress-store-locator-plus-google-api-key/

    When I go to the first url and use Browser tools/inspect/console the following errors come back.  I have no idea what a Google tag manager is. Also,  You need to debug your site, I am guessing that using version 4.4 .17 of WordPress , perhaps you have some plugin or theme using outdated jquery  or breakingSLP.

    Failed to load resource: the server responded with a status of 404 ()https://www.googletagmanager.com/gtm.js?id=GTM-N9D59MX

    /wp-json/store-locator-https://www.googletagmanager.com/gtm.js?id=GTM-N9D59MXplus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/3000Australia:1 Failed to load resource: the server responded with a status of 500 ()

    When I perform a search looking at the Network I also see this:

    VM30:1 GET https://www.kelato.com.au/wp-json/store-locator-plus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/3001Australia 500

    (anonymous) @ VM30:1

    send @ jquery.js?ver=1.11.3:5

    ajax @ jquery.js?ver=1.11.3:5

    m.(anonymous function) @ jquery.js?ver=1.11.3:5

    getJSON @ jquery.js?ver=1.11.3:5

    geocode @ slp_core.min.js?ver=1545006973:1

    doGeocode @ slp_core.min.js?ver=1545006973:1

    searchLocations @ slp_core.min.js?ver=1545006973:1

    onsubmit @ (index):351

    #58292
    Adam
    Participant

    Hi,

    Yes, I have already setup the key.

    When I change where the map is centered, this responds as expected. If I check the box to show locations at startup, I also see an expected list of results at startup.

    I have also added a new address and this was geocoded correctly.

    As you mentioned, there is an error occurring when a search is submitted. How do I troubleshoot this to find out what is causing the error?

    #58294
    stephan.schmatz
    Participant

    I have got the same problem, but there must be a problem within SLP, because it works when I am logged in in WordPress and doesn’t work, when I am not logged in.

    Here’s my environment, but I have this problem with a total of 5 websites, hosted on different providers.

     

    Store Locator Plus®:5.0.1

    Site URL:http://www.lambrettabikes.com

    This Info Cached:1523607463

    Network Active:No

     

    WordPress Version:5.0.2

    PHP Version:7.0.8-0ubuntu0.16.04.3

    MySQL Version:5.7.24

     

    PHP Limit:256M

    WordPress General Limit:40M

    WordPress Admin Limit:256M

    PHP Peak RAM:8 MB

    PHP Post Max Size:50M

    #58310
    Cici
    Keymaster

    The internet was squirrel-y yesterday .   My personal attempt to log into my Nest.com account failed.

    Adam, you have a fatal error on that site and you also may have  internal server issues preventing a search. Either way your errors without doing a search shows:

    https://www.googletagmanager.com/gtm.js?id=GTM-N9D59MX

    you can troubleshoot by using any browser developer tools, look under  Network while performing a   search and see what returns. I see this ” Request URL: https://www.kelato.com.au/wp-json/store-locator-plus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/2000

    Request Method: GET

    Status Code: 500 

    Remote Address: 101.0.113.246:443

    Referrer Policy: no-referrer-when-downgrade

     

    If you look at the status code, 500 is a server error, is your hosting company blocking> The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

    This error response is a generic “catch-all” response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.

     

    Stephen, you have a totally different issue, your site is not secure and you are getting error messages” Failed to load resource: the server responded with a status of 404 (Not Found)”  You need to start a new post and be specific abpout your issues.

     

    #58320
    Adam
    Participant

    Google Tag Manager has nothing to do with the SLP issue.
    Google Tag Manager is used for marketing tracking and analytics.
    I disabled Tag Manager and the issue with SLP is still occurring.

    The error is happening on the line specific to SLP:
    https://www.kelato.com.au/wp-json/store-locator-plus/v2/geocode/cc2a9cffbf54a5cae55c01ecbe2280e5/2000

    Am I right in guessing that when a user submits a search, SLP uses Google Maps (through the API) to find the searched location, then returns this location and the cluster of stores closest to this location?

    Looking in my Google account, the API requests are coming through to Google and there are no reported errors there.

    When looking in the Firefox Console, I get this error:
    <span class=”message-body-wrapper”>SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
    </span>There is no JSON data being returned by SLP.

    This is the next line after the 500 error:
    Google JavaScript API geocoder failed with status ERROR results undefined   slp_core.min.js?ver=1545006973:1

    So the request is being sent to Google just fine, Google is reporting no errors, but the results are not coming back into SLP correctly.

    Please provide some solutions for how to get the JSON data to return correctly.

     

    #58327
    Cici
    Keymaster

    Adam, In your case It is your server configuration …As mentioned before.   SLP is working. SLP from loading.

    And as far as Google tag manager, yes we know that, but any JSON errors or other errors can stop . The PHP JavaScript page header is a critical part of a working Store Locator Plus installation. Since it loads very late in the page creation process it is susceptible to failures from almost anything else you may be loading on the page or your WordPress site

    Look at the screenshot and the error that is showing google tags built into your index.

    Also, do you have referrers? Do you have just a browser key. Please read how to restrict your key. Currently it is not being blocked  or restricted because I can clearly see it. I am guessing you have it in wrong spot or set up incorrectly for that customer

    https://www.storelocatorplus.com/protecting-your-google-api-keys/

    or if you do not restrict just add  browser key

    https://www.storelocatorplus.com/wordpress-store-locator-plus-google-api-key/

    Attachments:
    You must be logged in to view attached files.
    #58714
    Lance Cleveland
    Keymaster

    You have extra security on your server blocking the REST API requests.

    http://www.lambrettabikes.com/wp-json/store-locator-plus/v2/geocode/793fa2a7559e261548089e66b4bb03f3/de/98553

    {"code":"rest_cannot_access","message":"DRA: Only authenticated users can access the REST API.","data":{"status":401}}

    That is a WordPress issue — usually a proxy server or plugin blocking access.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.