- Issue created by @prudloff
- Merge request !174Issue #3422013: AJAX race condition when facet block is inside view header → (Open) created by prudloff
- Status changed to Needs review
9 months ago 10:35am 20 February 2024
We have a view were we use the views_block_area module to place the facet block inside the view header.
This causes problems because the /views/ajax
and /facets-block-ajax
AJAX requests both update the same HTML.
If /views/ajax
finishes first, it rewrites the blocks ID and then the replace command returned by /facets-block-ajax
does not find the block to replace.
(This in turn makes Drupal.detachBehaviors()
call the detach function of behaviors with context = document, which causes all sorts of problems.)
But in this scenario, we don't actually need to call /facets-block-ajax
because /views/ajax
already updates facets since they are inside the view.
facets-views-ajax.js
should not send the request to /facets-block-ajax
if the facet blocks are inside the view.
Needs review
2.0
Code