Skip Navigation

[Resolved] Ajax filtering issue with Relevanssi

This support ticket is created 5 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by stuartm-2 5 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#1290473
ajax issue.PNG
ajax issue 2.PNG

I am trying to: Use filters and a search bar in a View with ajax results which worked fine for search just post Title, now i installed Relevanssi to search specific custom field with the search bar which works great for full page refresh, but now the the filtering options below dont do anything. The only solution is to disable ajax and refresh page on submit button for the filters which is not ideal.

How to make the filters work without needing to click the submit button on the search bar?

Thank you

#1290541

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It's not quite clear reading your question, did you try ajax results update whenever a filter changes (you can also add a Search button next to the text search)?

Does it not find the correct results?

#1291057

Hello,
I did try ajax results update whenever a filter changes but dosent work, when i disable relevanssi it works.
Any ideas?

#1291539

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I set up a completely clean test site with Relevanssi to reproduce the problem, but cannot, I don't have any problems combining Relevanssi with Views text searching and filtering via ajax, so I'm not sure what the issue is.

Can I get access to your site to see it in action, and check and update the settings if necessary to confirm the problem and see if I can spot the problem?

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

Can you confirm the page where I can find the search View, and it would also be helpful if you can give me some sample search terms and filters that will demonstrate the problem.

#1291715

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-07-15 at 12.37.38.png
Screenshot 2019-07-15 at 12.36.28.png

Thanks for that.

I did quite a bit of testing to try and identify where the source of the problem is, and it appears to be the version of WPBakery page builder shipped with your theme.

You can use the browser tools to monitor ajax requests, and with Salient WP Bakery active the ajax response for the custom search has a style tag injected before the JSON data response. I disabled the theme version of WP Bakery and installed the current vanilla WP Bakery, where the problem doesn't happen and you get the expected JSON response. (Compare the two screenshots.)

I need to install the theme version on my local test site and see if I can reproduce the same there, then I'll be in a position to escalate this so that we can see if we can identify why, although I should point out that we support WP Bakery, we don't support customised versions of it and it may be that the theme authors need to fix something and/or you have to persist with a page refresh, but we'll try and determine why to know what we can do from this end.

#1291785

I can see from your screenshots thats the issue, thank you for testing that. I removed the styles from the VIEW [ALL JOBS] and its actually working now. So i guess we cant add any styles inside a view with a custom visual composer? Anyways i put the styles globally and everything runs as its supposed to.

You have been very helpful Nigel, thank you for spotting that!

#1291787

Thank you