I can't get ajax facets to work properly. I have a search api view with a page display and an exposed search text field and two facet blocks.
While the ajax facets work great on their own, they disregard the exposed views filter. For example if I enter a search term the view is refreshed correctly. But the facets aren't updated accordingly. I see there's a call to facets-block-ajax, but it returns the same results as if the search field wasn't used.
All this works properly when ajax is disabled.
Comment | File | Size | Author |
---|---|---|---|
#19 | 2986020.patch | 3.55 KB | borisson_ |
#19 | interdiff-2986020.txt | 2.6 KB | borisson_ |
#11 | 2986020-11.patch | 967 bytes | Ice-D |
#10 | 2986020-10.patch | 1000 bytes | Ice-D |
#9 | 2986020-9.patch | 1.03 KB | Ice-D |
Comments
Comment #2
Ice-D CreditAttribution: Ice-D commentedI 've written a patch that works for me.
Comment #3
Ice-D CreditAttribution: Ice-D commentedComment #4
Ice-D CreditAttribution: Ice-D commentedSmall correction.
Comment #6
Ice-D CreditAttribution: Ice-D commentedAnother fix. Still not sure if the issue is only on my end though.
Comment #7
TuWebO CreditAttribution: TuWebO at Metadrop commentedHello,
I will double check, but have similar problem (I think).
Comment #8
TuWebO CreditAttribution: TuWebO at Metadrop commentedHello,
I confirm, same issue as described here and patch #6 is working fine for me.
Just did a quick test, but It is working with hierarchycal facets and normal ones.
Thanks very much @Ice-D, I will try to also test a little bit more.
Comment #9
Ice-D CreditAttribution: Ice-D commentedThanks for checking the patch @TuWebO!
Here I'm just making the code a little shorter and more readable.
Comment #10
Ice-D CreditAttribution: Ice-D commentedEven shorter.
Comment #11
Ice-D CreditAttribution: Ice-D commentedRemoved unused variable.
Comment #13
Ice-D CreditAttribution: Ice-D commentedComment #14
ma_ko CreditAttribution: ma_ko commentedLatest patch is working for us, too.
Comment #15
borisson_That looks great, we should probably add tests as well for this.
Comment #16
Ice-D CreditAttribution: Ice-D commentedI've never written a test but I'll give it a try.
Comment #17
borisson_If you can't figure it out, that would be understandable, because we're should write a JavascriptTestBase test for this. Those are really hard to write. I should have some time over the weekend to look at this.
Comment #18
Ice-D CreditAttribution: Ice-D commentedAlright, unassigning for now because I don't have much time ;) I'll check your test and learn from it :)
Comment #19
borisson_Comment #20
Ice-D CreditAttribution: Ice-D commentedWorks good for me!
Comment #21
TuWebO CreditAttribution: TuWebO at Metadrop commentedHello,
Testing it again and soft limits seems not to be applied. I've red this issue #2985159: AJAX update breaks soft-limits which seems to be related to this one for the
once()
part.Is it something that we should work on this issue or we should add another issue for this?
Thanks again, ajax is working really good.
Comment #23
borisson_Soft limits is another issue, can you open a new issue in the queue here? That would be awesome! Thanks.
Comment #24
TuWebO CreditAttribution: TuWebO at Metadrop commentedHi @borisson_ ok, I'll test them in clean installation and post an issue if I find something weird. I have to double check that wrong behaviour wasn't because of my code.
Thanks to everybody, this is a really nice feature, and works pretty well.
Comment #25
borisson_@TuWebO: I checked the commit history yesterday evening, and noticed that there was a commit to fix soft limits with ajax already. I'm trying to get a new release out this week.
Comment #26
TuWebO CreditAttribution: TuWebO at Metadrop commentedHi @borisson_ great news then. We will wait then and test it in the new release.
Comment #27
andyg5000Thank y'all for this!
On a related note, I was stumped by facets showing up that were unrelated to the filtered views results. It was because the default option for new facets is "OR" instead of "AND". Simple fix, but I ended up all the way here before I figured it out. Dropping a note for others that get caught by the same config issue.