Support » Plugin: WP Store Locator » Locations not workin: “Searching” is still loading and I only have two locations

  • Resolved Jess

    (@chibiunicorn)


    Hey,

    I can’t provide a link to the website I’m working on because it’s password protected by the company I work for. However, I have a screenshot which shows what it’s doing:
    https://imgur.com/5thl4M0

    Browser/Server keys work. However, I don’t understand why not even one location is showing up on the sidebar. It does however work perfectly within the New Store posts’ edit page.

    How can I make the locations shows up on the sidebar?

    Thanks,
    Jess

    • This topic was modified 1 month, 2 weeks ago by  Jess.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If it keeps searching, then there’s either a problem with a JavaScript, access to the admin-ajax.php is blocked by possible a security plugin, or there’s another server issue.

    You can find out out this in the browser console, which you can access with F12.

    Any JS errors wills how up under ‘console’, and under ‘network -> XHR’ you can see if there any errors with the response. It should also show 200 next to the XHR request itself.

    If you disable all other plugins for a second, then it does work? And with a default WP theme?

    Jess

    (@chibiunicorn)

    I tried disabling every plugin and setting it up to the default WP theme. Still no luck though.

    This is what it says in my console:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://yummydoh.wpengine.com/wp-content/themes/Impreza/fonts/fa-regular-400.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
    
    A Geolocation request can only be fulfilled in a secure context. wpsl-gmap.min.js:1:1612
    
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://yummydoh.wpengine.com/wp-content/themes/Impreza/fonts/fa-regular-400.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
    
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://yummydoh.wpengine.com/wp-admin/admin-ajax.php?lang=en&action=store_search&lat=45.501689&lng=-73.56725599999999&max_results=25&search_radius=50&autoload=1. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

    My website is a subdomain type of URL (http://yummydoh.wpengine.com/). Would that influence this? Because it works perfectly fine in my local server (http://localhost:8888/).

    Thanks,
    Jess

    • This reply was modified 1 month, 2 weeks ago by  Jess.
    • This reply was modified 1 month, 2 weeks ago by  Jess.
    Plugin Author Tijmen Smit

    (@tijmensmit)

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://yummydoh.wpengine.com/wp-admin/admin-ajax.php?lang=en&action=store_search&lat=45.501689&lng=-73.56725599999999&max_results=25&search_radius=50&autoload=1. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

    The error suggest your making a request from domain a to domain b, which is for security reasons not allowed by the browser.

    This is fixable by setting the correct headers when a request is made, but this is quiet technical to setup ( and how to do it is also based on your server configuration ), so if this is the case, then it’s better to ask if your host can configure the request headers for you so you can make AJAX request from domain a to domain b.

    But as soon as the site goes live on domain.com or so, then all will work fine again, as long as you don’t make requests to external domains.

    • This reply was modified 1 month, 2 weeks ago by  Tijmen Smit.
    • This reply was modified 1 month, 2 weeks ago by  Tijmen Smit.
    Jess

    (@chibiunicorn)

    Sweet! I had a feeling that was the case! Because aside from my localhost, it even works well on one of my domain.com websites. I’ll just work on it via my localhost instead of the subdomain. Thank you for resolving this!

    • This reply was modified 1 month, 2 weeks ago by  Jess.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.