"Do not use other items selections…" not working for particular facet?
2 years, 11 months ago #19407
I think I’m slowly losing my mind, because I cannot for the life of me understand why this is happening.
So I’ve got a facet based on content type. It’s a radio box. I’ve got the “Do not use other items selections to calculate item count” option checked, so picking a content type shouldn’t make the others disappear, right? That’s what I would think, but for one particular facet, it is behaving differently.
Here’s a video:
Note that this particular facet is styled to look like tabs, but this isn’t a CSS issue. The HTML itself shows that the other items are not coming through.
Can someone help me understand how this is possible? Anything that might get us closer to fixing this would be greatly appreciated.
THANK YOU!2 years, 11 months ago #19408
Oh! I should add – this definitely isn’t a JS issue or anything front-end related either. I dumped the facets before they get printed to the screen and they’re definitely getting removed server-side.2 years, 11 months ago #19434
One last thing I should point out – I’m not looking for the solution necessarily. Any tips or ideas on where to even begin troubleshooting this would be greatly appreciated 🙂2 years, 11 months ago #19436
Well, this form isn’t actually using AJAX, but the URLs aren’t showing anything weird:
BUSTED FACET (hiding unselected items):
STANDARD FACET (working as expected):
/?s=test&wpsolr_q=test&wpsolr_fq%5B0%5D=author%3ASteve%20Farley2 years, 11 months ago #19439
We have very few fields checked, but all the taxonomies we’re filtering by are checked:
The problematic facet here isn’t a custom field though, it’s “post type”. So, it should be working without any additional configuration, right?
I’ll check out the debug.log, see if that reveals anything. Thanks for the guidance!!! <32 years, 11 months ago #19440
Hm, not seeing any debug options on screen 2.1. Is that normal?
https://drive.google.com/open?id=1m5mPeGhxklvMdpfTIPZKRl6y7SaxbsxY2 years, 11 months ago #19444
Ok, I finally figured it out. Here’s what was going on for future readers:
Basically, it looks like clicking one of the post type tabs was overriding the main query’s filters in addition to adding them under the post filters.
Here’s an image showing the query for the 2 examples above:
The busted radiobox facet (clicking a post type tab) is on the left, whereas a standard radiobox facet (clicking on an author) is on the right.
We had to hack the plugin to fix this for the time being, but hoping to get a better solution in place so we can keep up with updates 🙂
Thanks for taking a look!2 years, 11 months ago #19447
Awesome! Glad I could help 🙂
You must be logged in to reply to this topic.