Forums › Forums › Search & Filter Pro › Checkbox Tags not searching properly
- This topic has 17 replies, 2 voices, and was last updated 8 years, 9 months ago by Anonymous.
-
Anonymous(Private) January 23, 2016 at 3:20 pm #35092
Hi, I’ve just purchased this plugin and I can’t seem to get it to work properly for my website. I hope that you can help me troubleshoot it. I’m using the wordpress theme Novavideo (paid, legit). I’ll try to be as specific and detailed as possible with my problem.
When using the Tag Field (Checkbox, Search Operator=AND) in the Search Form UI, if I select a tag it will return results for that tag and the first tag in the list. I even deleted a tag that was before the current one, so it doesn’t matter what the tag is as long as it’s first in the list. For example:
Video 1
-cool -crazy -funnyVideo 2
-crazyVideo 3
-cool -nice[ ]cool
[x]crazy
[ ]funny
[ ]nice[Submit]
When I select submit, it returns results for videos tagged as cool and crazy, so the only result is Video 1 when the results should be for only the crazy tag, which would return Video 1 and Video 2. After clicking submit, the Search Form UI looks like this:
[x]cool
[ ]crazy
[ ]funny
[ ]niceSo, the original selection of crazy is now gone and replaced with cool, even though it filtered for both the cool and crazy tag while returning the result Video 1.
Turning ajax off for the site theme doesn’t change anything
Turning ajax off in the plugin doesn’t change anything
Turning ajax off for both the site and the plugin doesn’t change anything
Use a custom template for results? is checked and using search.php.
Using index.php does not work.
Using display results As an Archive
Seaching the following post types: Posts
Disabling auto count and auto submit doesn’t change anything.The website is supercringe.com — I have a couple of videos posted so maybe it will help to play with the search bar to help figure it out.
Ross Moderator(Private) January 24, 2016 at 9:46 pm #35153By any chance are you doing something with the filter
sf_input_object_pre
?https://gist.github.com/rmorse/7b59b45a14b1ca179868
Thanks
Ross Moderator(Private) January 24, 2016 at 10:06 pm #35156So odd, that really doesn’t make any sense at all (as in, something really strange must be going on to cause this behaviour).
Somewhere in your setup, there is code manipulating values that relate to tags – and is somehow defaulting the tags to the first option “autism” – I actually can’t think how it could be achieved without using the filter I linked above…
The only thing I would suggest is if you can disabled all ohter plugins, and test with a default theme – even if this is only locally.
Something strange is going on, and it certainly seems like non standard WP behaviour.
Thanks
Ross Moderator(Private) January 25, 2016 at 12:34 pm #35194Add this on the line before
have_posts():
<?php do_action("search_filter_archive_query", 11995); ?>
Replace 11995 with the ID of your search form.
Let me know!
Anonymous(Private) January 25, 2016 at 1:49 pm #35208It’s getting close!
It looks like it searches properly now, but when it updates it clears the initial search and checks the “autism” box.
For example if you go to the site and check the “retail” box and then search, it will display the only result tagged with “retail” but then the “autism” box will be the only one checked after the search.
Ross Moderator(Private) January 25, 2016 at 2:23 pm #35210Hi Ryan
So taking a look, it does seem like something in your setup must be modifying the forms in S&F or the
$_GET
parameters before search & filter tries to access them –I think at this stage you need to disable all other plugins, and test with another theme – just so you can track down what is actually causing an issue.
A better way might be to create a dev site, and add in the plugins & themes one by one until the issue shows again.
Something really strange is going on and I believe it will be to do with a filter or custom code somewhere that is not being used properly.
Thanks
Anonymous(Private) January 26, 2016 at 11:56 am #35307I went ahead and disabled all the plugins other than S&F Pro. The problem still persisted in the Novavideo theme I want to use, but does not happen in a couple other plugins I tested. On the site I’ve noticed that there is a “Sort by” option at the top above the videos. Could this be what’s conflicting with it? There is no option to disable this in the theme options and I don’t know while .php file it corresponds to.
Edit:
One more thing I just noticed is that if I check the box “Top Cringe” which returns all four videos, it returns a result of all four videos (which it should) but the search reads “Search results for “” (2 videos)” which would be the result if I had only searched on the “Autism” tag. -
AuthorPosts