• Resolved stormkuo

    (@stormkuo)


    Your map plugin is fantastic, and I’ve been using it for 6 years. I’ve even developed a special search system with it. It works fine in PHP 7.4, but after upgrading to PHP 8.0, I encountered the following error, and the map search is interrupted halfway through. Do you have any insights on this?

    Uncaught TypeError: Cannot use ‘in’ operator to search for ‘length’ in

    at c (jquery.min.js:2:1131) at Function.each (jquery.min.js:2:3090) at Object.success (wpsl-gmap.min.js:1:11932) at c (jquery.min.js:2:25304) at Object.fireWith [as resolveWith] (jquery.min.js:2:26053) at l (jquery.min.js:2:77782) at XMLHttpRequest.<anonymous> (jquery.min.js:2:80265)"

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

    (@farroyob)

    Hi there, thanks for reaching out.

    Wp Store Locator is fully compatible with versions of PHP up to the most recent (8.3.X as of today), so please double check you have the latest version of the plugin. If you do, then also double check the version of jQuery that your theme is using, and also that you don’t have any other plugins that may be interfering with jQuery. If in doubt, you can also share with us the URL of your website and I can also take a look, see if I can spot anything.

    Best regards,

    Thread Starter stormkuo

    (@stormkuo)

    My website is https://furkid.org/.

    I’ve used the map plugin you developed to create a nonprofit website where users can search for pet-friendly locations nearby or in specific areas.

    Currently, I’ve adjusted PHP to 8.3.4, but when searching beyond my own location, the search stops halfway through. Please take a look, thank you.

    Hi again,

    Thanks for the URL. I can see you are using an optimization plugin (autoptimize). These type of plugins are known to sometimes cause issues with javascript-rich plugins like Wp Store Locator. To rule this out, could you please disable momentarily “autoptimize”, and see if the issue persists?

    Also, make sure Wp Store Locator is updated to the latest version (2.2.241).

    Let us know, many thanks!

    pro-tip; you can generally disable Autoptimize on a per-request basis by adding ?ao_noptirocket=1 to the URL.

    if the problem is not there at that point, some autoptimize (re-)configuration might be needed to fix this. there are troubleshooting tips and info on how to exclude in the AO FAQ.

    hope this helps debugging,
    frank (ao dev)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php8.x Uncaught TypeError’ is closed to new replies.