If you perform a search on a page that uses multiple sliders, only the first slider's min/max are adjusted based on the search results. All other ranges maintain their original min/max even though they too should have new min/max values.

CommentFileSizeAuthor
#12 1302678-12.patch3.08 KBAnonymous (not verified)
#11 search_api_ranges_1302678_0.patch1.6 KBkhiminrm

Comments

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Hi, I can't reproduce this, maybe it is related to your search setup. For example, I have a price and a discount slider, and they are correctly updated. Can you tell me more about your setup?

nbucknor’s picture

Status: Postponed (maintainer needs more info) » Active

I played around with my search page a bit more and realized there are specific cases when it does not work. I'm using Search API Views page, along with 2 normal facets and 9 range facets.

The form ids for the slider forms span from "search-api-ranges-block-view-form" to "search-api-ranges-block-view-form--9"

If i change the the slide with the form id of "search-api-ranges-block-view-form--4", all sliders from 0 - 4 will have updated min/max values, while all the sliders between 5-9 will have their original min/max values. If I update slider 8, all sliders up to 8 will update, but slider 9 will not.

If you need more details, I can provide them.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this either. Remember, changing one slider influences the min/max values for each other slider, due the new search restriction. The slider values are not static, but dynamically adapt to the min/max values for the given filter environment.

I assume that was the issue? In that case, the behavior is normal.

nbucknor’s picture

Sorry for the late response. No, that is not the issue. Let's say I have 10 filters, and I change filter number 5. In this case, filters 1 - 5 dynamically adapts their min/max values for the given environment (as desired). However min/max for filters 6 - 10 do not dynamically adapt to the given environment (which should be something like $78-$85), instead they retain the default min/max ( something like $0 - $100).

If I change filter 9, filters 1-9 dynamically adapt, but 10 does not, etc.

nbucknor’s picture

Status: Postponed (maintainer needs more info) » Active
Anonymous’s picture

Ok I understand now and have been able to reproduce it. Let's see how to solve this.

dicreat’s picture

subscribe

merilainen’s picture

Any progress on this? I have the same issue with two sliders, using the second one will adjust the first one's range after page reload, but adjusting the first one doesn't affect the second one.

khiminrm’s picture

Hi! I don't know if the bug in my case is related to this issue.
I have noticed a problem on my site with two sliders on one page.
One slider is based on price field, which has value for all entities and another slider is based on the field which can be empty. And when I use slider widget for second field, my first slider(price field) start showing wrong min value. When I use only one slider (for the same price field), it shows right min value. Id's of the forms are: "search-api-ranges-block-slider-view-form--2" for price slider and "search-api-ranges-block-slider-view-form" for the second slider.

khiminrm’s picture

To #9. I think in my case the module works as design, but maybe if the second slider have default(not changed and submited) values it must not influence on min value of the first slider.

khiminrm’s picture

Status: Active » Needs review
StatusFileSize
new1.6 KB

Here is the patch for version 1.4
It solves for me my problems with min ranges and the problem described in this issue.

Anonymous’s picture

StatusFileSize
new3.08 KB

I made some minor improvements to #11, see attached.

It works well for me, when using 2 ranges. Can somone test if this works for 3, 4, 5 etc. ranges?

khiminrm’s picture

I've just tested the patch from #12 with 6 ranges. All seems fine.

khiminrm’s picture

I've tested the patch with last dev version.

khiminrm’s picture

Status: Needs review » Reviewed & tested by the community
Anonymous’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

windrainer’s picture

Issue summary: View changes

I don't get it, why not let the slider keep its original min and max value so the user can slide it back....