"Do not use other items selections…" not working for particular facet?

  • martinparets
    Participant
    4 years 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=sharing

    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!

    martinparets
    Participant
    4 years 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.

    martinparets
    Participant
    4 years 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 🙂

    wpsolr
    Keymaster
    4 years ago #19435

    Comparing the JS Ajax call parameters when your facets and standard facets are selected?

    martinparets
    Participant
    4 years ago #19436

    Well, 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%3Aresource

    STANDARD FACET (working as expected):
    /?s=test&wpsolr_q=test&wpsolr_fq%5B0%5D=author%3ASteve%20Farley

    wpsolr
    Keymaster
    4 years ago #19437

    Are the custom field types in screen 2.2 the same?

    wpsolr
    Keymaster
    4 years ago #19438

    There is also an option in screen 2.1 to write the Elasticsearch search queries in debug.log. Can be handy to debug.

    martinparets
    Participant
    4 years ago #19439

    We have very few fields checked, but all the taxonomies we’re filtering by are checked:
    https://drive.google.com/open?id=17eG7UP8QtE62zEKtOX8WelQUqntFGw6j

    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!!! <3

    martinparets
    Participant
    4 years ago #19440

    Hm, not seeing any debug options on screen 2.1. Is that normal?

    https://drive.google.com/open?id=1m5mPeGhxklvMdpfTIPZKRl6y7SaxbsxY

    wpsolr
    Keymaster
    4 years ago #19441

    Sorry, ES debug logs is in next release.

    martinparets
    Participant
    4 years 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:
    https://drive.google.com/open?id=17g7wPcwY9UyKwXWZasJJTjMpSRHvVtyL

    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!

    wpsolr
    Keymaster
    4 years ago #19445

    I’ll check if exclusion is not working on the post type facet. If not, I’ll fix it in the next release. Thanks for the debug.

    wpsolr
    Keymaster
    4 years ago #19446

    I checked, and can confirm that post type filter exclusion is not working. Will fix it.

    martinparets
    Participant
    4 years ago #19447

    Awesome! Glad I could help 🙂

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.