Skip Navigation

[Closed] Uncaught reference errors when logged out are disabling view filters

This support ticket is created 2 years, 2 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Shane 2 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#2451043

On this page I have a view with filters:

hidden link

When logged in these 2 errors are gone and the filters work, but when logged out the filters no longer work and I see:

Uncaught ReferenceError: moment is not defined
at <anonymous>:2:1
at (index):9:5336
at new Promise (<anonymous>)
at RocketLazyLoadScripts._transformScript ((index):9:5028)
at async RocketLazyLoadScripts._loadScriptsFromList ((index):9:5429)
views-frontend.js?ver=1662382032:1

Uncaught ReferenceError: wpv_pagination_local is not defined
at new a.ViewFrontendUtils (views-frontend.js?ver=1662382032:1:11193)
at HTMLDocument.<anonymous> (views-frontend.js?ver=1662382032:1:78021)
at HTMLDocument.<anonymous> ((index):9:7121)
at RocketLazyLoadScripts._triggerDOMContentLoaded ((index):9:7702)
at async RocketLazyLoadScripts._loadEverythingNow ((index):9:4417)
hidden link

#2451063

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Timothy,

From what I tested on the frontend the filters are working for guest users. However whenever you see Javascript errors in the website console it's mostly likely due to a plugin conflict of some sort.

What this means is that you will need to go through your list of plugins and disable each of your plugins one at a time while checking to see if the issue still remains.

Thanks,
Shane

#2451341

Are you sure it's working on your end. I've tried various browsers and it's not on my end:

hidden link

But I did a plugin check and it seems to be due to my caching plugin WP Rocket. But why would it work when logged in but not when not logged in?

And it seems more specifically it's due to the "Minify javascript files" setting. What toolste files would I need to exclude from that that initiate the filters?

Thanks

#2451689

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Timothy,

The url i had tested was
hidden link

I assumed that this was the URL with the issue, however checking on this one here hidden link

I'm able to see the issue.

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

I've enabled the private fields for your next response.

Thanks,
Shane

#2452407

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Timothy,

The issue was being caused by the WP Rocket plugin. Applying the safe mode resolved the issue.

I would suggest taking a look at FAQ document below.
https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/

This might help to resolve the issue as well.

Thanks,
Shane

#2452645

Yes, I already knew it was caused by WP Rocket and stated that above. I was trying to find out what toolset files handle the filtering so I could exclude those from being minified to avoid the issue.

Anyway I Will use the link you provided to try.

Tim

#2452647

Looks like I needed to exclude jquery.min.js from being deferred.

#2453137

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Timothy,

Thanks for the update, can you let me know if everything is ok now.

Thanks,
Shane

The topic ‘[Closed] Uncaught reference errors when logged out are disabling view filters’ is closed to new replies.