Skip Navigation

[Resolved] problem with a custom search bar with filters

This support ticket is created 4 years, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 22 replies, has 3 voices.

Last updated by Christian Cox 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1837519

Hi I created a new search bar with filters.
the search bar searches for jobs in custom type jobs section.
Depending on some grades filter it display the job pages.
so each job page has 13 filter and one taxonomy (gender)
the 13 filter are grades, select box.
10 of them are grade from 1 to 5
and 3 of them are other type of grade for exemple: 10, 20 ,30,40 to 90.
so the search works fine when I added 4 - 5 filters but when I added the remaining filter, the website broke for 1 - 2 days due to The Ajax and database calculation. so I don't know what to do to improve this because it is not working at all.

#1837521

Also I remove this from my website since this break the website. I recreated a new website locally wit only the 2 toolset plugin and it does the same exact thing

#1837523

the search is comparing filter in this way: as number lower or equal to

#1838441

Nigel
Supporter

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

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

Can we get a copy of the site you prepared locally for testing with just Toolset plugins so that we can try and identify the problem?

You can share a backup from Duplicator (or All in One WP Migration) via dropbox or similar here (the link will be private).

hidden link

#1847563

hi this is the link I duplicate the website with duplicator
hidden link

#1847667

Hi, I have requested access to the Drive space so I can download the archive. Please check your email for the notification. I will stand by for an update.

#1847835

I accepted

#1847849

Thank you, I have downloaded the archive, so you can now delete it from Drive.

#1848417

Ok good

#1848445

did you find the problem

#1848475

I'm still working on this and will provide an update shortly.

#1848507
change-assignment.png
block-navigation.png

I see a problem in the Search Bar editor here:
/wp-admin/post.php?post=3263&action=edit
If you select the View block in the Block Navigation menu, you will find a setting in the Custom Search configurations: "Show only filter options that would produce results" (block-navigation.png). When I turn off this setting, more filters appear in the search filters area on the front-end of the site. It seems the first custom search filter is based on a custom field with the slug "yom-a-meah", but I cannot find that field in Toolset > Custom Fields > Post Fields. I visited Toolset > Custom Fields > Post Fields > Post Field Control, and I can see that this field has been deleted or removed from its Post Field Group, so that is why no results are displayed in the View and the other filters do not work. You must disable "Show only filter options that would produce results", or remove this filter from the Search Bar, or go to Post Field Control to Change assignment of this field so that it can be found in one of the existing Post Field Groups, like Filtres de recherche or info document (change-assignment.png).

#1848573

I am not talking about this search view I created one in toolset/ views without front end like this and the thing is it is connected to the Postes custom post type so when I create multiple post in Postes custom type I select some notes etc and I do a research not from where you search but with the view search I created it does not load and make so many sql request that I have to restart the server each time

#1848649

Okay thank you for providing the required information, let me run some additional tests on the other View and give you an update.

#1848723

It seems that the problem occurs as soon as a 10th custom field filter is added to the View. If only 9 field filters exist, the problem does not occur. It does not seem to be related to any individual field, but is cumulative based on the total number of field filters. I am still investigating and will give you another update shortly.