Skip Navigation

[Resolved] Ajax results update not working

This thread is resolved. Here is a description of the problem and solution.

Problem:

A user reported that when the "Ajax results update when visitors change any filter value" option is enabled in the views settings, the results don't update with the change in filters.

Solution:

The user later informed that it was due to the custom function that was removing some core Toolset scripts.

Relevant Documentation:

n/a

This support ticket is created 3 years, 3 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.

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 4 replies, has 2 voices.

Last updated by volkerG 3 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2318911

I have a view where i added a filter and selected "Ajax results update when visitors change any filter value". However, the results do not get updated. It seems, the respective js function is not triggered at all.

When I instead add a button, the update works though the page gets reloaded fully.

hidden link

Turned off caching, checked if bootstrap is loaded, however I am stuck and can't find the reason why Ajax is not working.

#2319077

Hi,

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

I've checked the page with the view and there was no script error shown in the browser's console.

To troubleshoot this, 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-One.

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 access to the website's admin area for further investigation.

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

regards,
Waqar

#2319305

Hi Waqar,

The issue still persists. I will set up a staging environment today and will give you then access.

Kind regards,

Volker

#2319559

Hi Waqar,

can you send me again the request for confidential form (i cant open it again) so that I can give you access to the staging environment?

Kind regards,

Volker

#2319641

Following in the functions.php broke Toolset/Ajax:

function deregister_media_elements(){
   wp_deregister_script('wp-mediaelement');
   wp_deregister_style('wp-mediaelement');
}
add_action('wp_enqueue_scripts','deregister_media_elements');

Those lines were added long time ago for optimization reasons.