[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.
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
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.
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?
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.