• Hi I have two websites using this plugin. They have been working great for the last 4 years, but suddenly just the other day the maps stopped working.

    The API keys are fine, I checked. I turned off caching and no change.

    I noticed an error in the console that says:

    [Uncaught TypeError: cannot use ‘in’ operator to search for “length” in “< ! DOCTYPE html>\n…”
    jQuery 2
    Z https://www.apapenn.com/wp-content/plugins/wp-store-locator/js/wpsl-gmap.min.js?ver=2.2.241:1
    jQuery 4]

    So far the other 15 states using this tool have no issue. Thanks

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • farroyo

    (@farroyob)

    Hi, thanks for reaching out.

    I am not 100% sure but I would say this issue is somewhat related to some cache/optimization plugin that you may be using in your website, can you please let me know if you are using any of that kind of plugin? It appears at some point in the execution, some Javascript component tries to get the length of the HTML markup that is sent to the browser, but the “in” operator only works on objects. Apparently it is being used on a string.

    But, as I said, I am not sure what can be causing this. So let me know if you have some cache / optimization plugin, and I’ll try to find out if there may be something going on there.

    Regards,

    Thread Starter zabriskie_p0int

    (@zabriskie42)

    Hi, yeah. I have WP-Optimize turned on. No minification though. Redis Object Caching is turned off for this website as well.

    I also have GZIP and Leverage Browser Caching turned on.

    These have never impacted it before though in the 3 years. I did designate the specific page and JS file to not be cached but it still persists.

    farroyo

    (@farroyob)

    Hi again,

    The thing is, I am not totally sure the issue is necessarily related to Wp Store Locator, although I am not ruling it out either. See this screenshot.

    There seems to be an attempt to parse the whole contents of the HTML output, and it fails because it probably receives a wrongly encoded parameter somewhere, but I cannot determine where this error comes from just by examining the output of the website. Maybe, just to rule things out, disable momentarily the optimization plug-ins and see if the error persists.

    I am sorry I cannot determine more precisely the nature of the error with the information I can gather from the javascript console!

    But let me know what you find out.

    Thread Starter zabriskie_p0int

    (@zabriskie42)

    Okay, I’ll try this and see what happens.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Uncaught TypeError: cannot use ‘in’ operator to search’ is closed to new replies.