"Do not use other items selections…" not working for particular facet?
- martinparetsParticipant4 years, 6 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:
https://drive.google.com/file/d/1QPSHptOXQnH3un7kqRTGh7KeMFnSI5t7/view?usp=sharingNote 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!
martinparetsParticipant4 years, 6 months ago #19408Oh! 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.
martinparetsParticipant4 years, 6 months ago #19434One 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 🙂
martinparetsParticipant4 years, 6 months ago #19436Well, this form isn’t actually using AJAX, but the URLs aren’t showing anything weird:
BUSTED FACET (hiding unselected items):
/?s=test&wpsolr_q=test&wpsolr_fq%5B0%5D=type%3AresourceSTANDARD FACET (working as expected):
/?s=test&wpsolr_q=test&wpsolr_fq%5B0%5D=author%3ASteve%20FarleymartinparetsParticipant4 years, 6 months ago #19439We have very few fields checked, but all the taxonomies we’re filtering by are checked:
https://drive.google.com/open?id=17eG7UP8QtE62zEKtOX8WelQUqntFGw6jThe 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!!! <3
martinparetsParticipant4 years, 6 months ago #19440Hm, not seeing any debug options on screen 2.1. Is that normal?
https://drive.google.com/open?id=1m5mPeGhxklvMdpfTIPZKRl6y7SaxbsxY
martinparetsParticipant4 years, 6 months ago #19444Ok, 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:
https://drive.google.com/open?id=17g7wPcwY9UyKwXWZasJJTjMpSRHvVtyLThe 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!
martinparetsParticipant4 years, 6 months ago #19447Awesome! Glad I could help 🙂
You must be logged in to reply to this topic.