Skip Navigation

[Closed] JQuery customization code creates an error

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 4 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#1579121

I am trying to implement the code from this page: https://toolset.com/documentation/user-guides/maps/customizing-cluster-markers-with-javascript-functions/

Link to a page where the issue can be seen: hidden link

The map displays when I'm logged in but display nothing for visitors. Here is the error from Chrome:

Uncaught TypeError: Cannot read property 'set_cluster_options' of undefined
at HTMLDocument.<anonymous> ((index):109)
at i (jquery-1.12.4-wp.js:1)
at Object.fireWith [as resolveWith] (jquery-1.12.4-wp.js:1)
at Function.ready (jquery-1.12.4-wp.js:1)
at HTMLDocument.J (jquery-1.12.4-wp.js:1)

#1579749

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see exactly how this view is set up in the admin area.

Can you please share temporary admin login details?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1582361

Hi Tyler,

Thank you for sharing these details.

Initially, when I viewed your website's page ( hidden link ) as a logged-in admin or as a guest/visitor, no map was showing and the same script error was present in the browser's console.

However, after clearing cache through WP Rocket settings, the error cleared and the map started showing, but only when logged in as an admin.

With the exact same settings and custom script, I tried to reproduce this on my test website, but the map and custom marker showed as expected for admin as well as for guests/visitors.

This suggests that this is something to your website and most probably some setting at plugin, server or CDN level is forcing the older cached version of the page for guests/visitors.

To troubleshoot this further, I'll suggest the following steps:

1. Please make sure that WordPress, active theme and plugins are all updated to the latest versions.

2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty.

If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

3. In case the issue still persists, I'll need a clone/snapshot of your website so that it can be tested on a different server.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

I've set your next reply as private and please let me know how it goes.

regards,
Waqar

The topic ‘[Closed] JQuery customization code creates an error’ is closed to new replies.