Forums Forums Search & Filter Pro Post meta range not behaving as expected

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #191164

    Hello

    We have two post meta values which form a range, e.g.

    post_meta_from = 30
    post_meta_to = 45

    We are using Post Meta range with the start key set as post_meta_from, and the end key set as post_meta_to.

    The compare mode is set to “Post meta must be within input range”

    We do have min and max set to auto detect

    On the front-end, we have our results including links to single posts, and we append search parameters to the link. meaning if you hover over the link you can see these.

    This is all working fine, except that auto detect min and max don’t seem to be working, making it possible to create a query that should return no results. And when you do that, using this example:

    If you select 2 as from it updates the results.

    If you then select 8 as to it appears to update the results, however there should be no results.

    The selections made show as parameters in the url. However, when you hover on single post links, you can see that the last selection has been ignored, and instead the from value is the value you last selected (or if this is for first selection, the largest available value).

    This happens whenever you select a range that should return no results.

    Interestingly, if you hard refresh a query that returns no results, it behaves as expected an returns no results, so it seems it is the ajax update which is ignoring things.

    To help show what I mean, I will include a private response with a link to the site where this is happening.

    Anonymous
    #191165
    This reply has been marked as private.
    Trevor
    #191171

    I think I understand. The values shown in the slider do not react to Auto Count and other filter changes?

    If this is what you mean, it is intentional, but we may offer other behaviors in V3.

    I set out a detailed explanation in this post:

    https://support.searchandfilter.com/forums/topic/custom-max-price-for-price-slider/#post-77119

    Anonymous
    #191257

    I’m not sure you’ve understood. It’s not a slider, it’s two dropdown inputs, one for value from to value to.

    Trevor
    #191265

    Ah, sorry, I meant that range and slider do the same thing; they are presentationally different, but the code underneath is the same.

    Anonymous
    #191271

    Ah right – that makes more sense. Ok so if this works in a way that when you refresh the page it returns a no results should that not do the same thing when we use the range field with ajax?

    Also, the link above the explanation isn’t working?

    Trevor
    #191274

    How odd, I just tried that shop demo and it worked for me. Even in a privacy window.

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