Forums › Forums › Search & Filter Pro › Post meta range not behaving as expected
Tagged: V3
- This topic has 6 replies, 2 voices, and was last updated 6 years ago by Trevor.
-
Anonymous(Private) October 17, 2018 at 12:19 pm #191164
Hello
We have two post meta values which form a range, e.g.
post_meta_from = 30
post_meta_to = 45We 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.
Trevor(Private) October 17, 2018 at 1:04 pm #191171I 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
-
AuthorPosts