• Hi,

    I have a strange error as shown below. We are creating a new website for the client and the issue is on the staging site which is using the exact same WPSL settings, stores and both sites are latest WP and WPSL versions.

    Stores won’t show on the front end with the below error showing in browser console. However if I view the page while logged as administrator store locator works perfectly with no console error.

    Hoping you can help.

    Error:
    Uncaught TypeError: Cannot use ‘in’ operator to search for ‘length’ in You are not allowed to access this part of the site.
    at s (jquery.js?ver=1.12.4:2)
    at Function.each (jquery.js?ver=1.12.4:2)
    at Object.success (wpsl-gmap.min.js?ver=2.2.16:1)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If you use a default WP theme, and disable all other plugins, does it then work better?

    Thread Starter DanS01

    (@dans01)

    Yes it works ok when I switch to 2017 theme & leave all plugins enabled.

    The theme I am using is Genesis Dynamik, but I have used this them before with WPSL so I don’t know what is going on?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    If it works with a default theme, but not with another one then it’s not really possible for me to debug it.

    You did flush the browser cache, and tried it in private mode as well?

    Maybe contact the theme author and ask what they changed in the last update?

    Thread Starter DanS01

    (@dans01)

    Hi Tijmen,

    Thanks for the reply. I re-installed the theme files and it started working so must have been some file corruption or custom edit we inadvertently did.

    Now that this is working we are having an issue with showing the Category names on the front end template. Is the code shown on the page below still current for showing cat names?

    https://wpstorelocator.co/document/category-names-in-search-results/

    When I add the code I get an error regarding terms not being defined as below. (note: not all stores have a category set, we only need to show category name for those with a category set).

    Uncaught ReferenceError: terms is not defined
    at eval (eval at m.template (underscore.min.js?ver=1.8.3:5), <anonymous>:34:2)
    at c (underscore.min.js?ver=1.8.3:5)
    at H (wpsl-gmap.min.js?ver=2.2.16:1)
    at l (wpsl-gmap.min.js?ver=2.2.16:1)
    at wpsl-gmap.min.js?ver=2.2.16:1
    at fm.N0 (streetview.js:35)
    at fm.j (common.js:12)
    at Object.c [as _t7w86l] (common.js:52)
    at GeoPhotoService.SingleImageSearch?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Try to flush the transient cache on the WPSL settings page ( tools section ).

    Thread Starter DanS01

    (@dans01)

    Hi, That did not work, Also I have no cache plugins installed.

    As a test I tries the ‘Include Post Content’ code found at the link below and got the exact same error except ‘description not defined’.
    https://wpstorelocator.co/document/include-post-content-in-search-results/

    Any other ideas?

    Thread Starter DanS01

    (@dans01)

    The console error is referencing the wordpress includes -js:
    wp-includes/js/underscore.min.js?ver=1.8.3 line 5 %3E Function

    So it doesn’t look like any other plugin conflict and we are running the latest version of WordPress. I even re-installed WordPress just to be sure we had fresh files.

    Thread Starter DanS01

    (@dans01)

    Still can’t find a solution to this, have also had the theme creator look into it.

    For now I’m doing a workaround where we will use the Fax Field to show Category names, means we have to update 300+ listings but it works.

    You can close this topic if you like.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Are you sure you added the code to include the terms data in the correct functions.php? If you’re using a child theme, then maybe also include it in that folder?

    Thread Starter DanS01

    (@dans01)

    Hi,

    Yes I’m sure it’s in the child theme custom functions.php file. The error only shows up when I add the code to the functions file so i’m sure it’s the right file.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Jquery error – Uncaught TypeError’ is closed to new replies.