- 🇬🇧United Kingdom joekers UK
The query is also affected by this issue - when the saved search is created, the query doesn't always have the conditions applied when using a view that has AJAX enabled.
As per the comment on [3315790-4] the active query doesn't have the filter applied from the AJAX call.
- last update
11 months ago 47 pass - last update
8 months ago 52 pass - Status changed to Needs review
7 months ago 2:26pm 2 February 2024 - last update
7 months ago 52 pass, 1 fail - 🇦🇹Austria drunken monkey Vienna, Austria
Thanks a lot!
I managed to write a test for this, which confirms both the problem and the solution. However, it unfortunately also demonstrates that the problem is even more severe than previously thought: not only is the URL saved for the search incorrect, but also the underlying search query is missing the facet filter. This means the results reported for the saved search will be wrong – and, unfortunately, the proposed patch doesn’t seem to fix this problem. It appears we’d have to construct the query object some other way in this case – though I don’t really know how, as we completely rely on the search query already executed on the current page for the whole “Save search” functionality.Anyways, still posting the patch with the failing test. I don’t think I’d commit this in the current form (after commenting out the failing test, of course), though, as it seems to me that this would actually make the situation worse: currently, users might at least notice that the search query is incorrect, when they follow the link. With the proposed patch, the link would point to the correct page, but the reported results would still be wrong. (Though, at least it will usually be more results than desired, not less, which is probably a bit less bad.)
Any input would be much appreciated.
The last submitted patch, 11: 3251247-11--ajax_facets_lost.patch, failed testing. View results →