[META] Overview of Facets + Ajax issues

Created on 16 August 2019, almost 5 years ago
Updated 11 May 2023, about 1 year ago

Until we model Facets as Views exposed filters Create views plugins to render facets and summaries in filters and areas Fixed , Facets and Views always have an impedance mismatch. (Also see #2957950: Add views area plugin )

So we currently have 28 and counting Facets / Ajax issues . Here's a try of an overview.

How facets identifies the block to be updated in ajax

* 🐛 Facets with AJAX not working in most of situations RTBC has a fairly elaborated patch that overhauls server-side generation and client-side recognition of facet block identifier and lets ajax grip on any non-core placed block
* #3012041-8: The introduction of AJAX facets breaks all facets using the checkbox-widget has a small patch that adds some block selector parsing server-side
* Robustify how ajax finds the facet block Needs review has a fairly elaborated patch that overhauls client-side finding of the ajax facet block
* #3071885: Facets with AJAX fails with JS error has a fairly elaborated but "not currently working" clientside patch
* 🐛 Ajax Facets do not support Range Slider Needs review has a patch that add some clientside finding of blocks
* Special case empty facets: #2989943: Ajax facets should render anything
* #3034918: Add Range Input View Update to facets-views-ajax.js has a patch that clientside excludes range blocks

Lost arguments and query parameters

* 🐛 Facets lost when search term changes, only with ajax Needs work
* Facets compatibility with views_ajax_history Needs work
* #2986981-13: Ajax facet block seems to lose Views context (filters, etc) has a server side ajax patch that amends views contextual arguments
* (same issue) #2986981-5: Ajax facet block seems to lose Views context (filters, etc) has a serverside code snippet that amends query parameters
* #3014227: Facets should update the current request facets query params on ajax calls. has a patch that clientside adds query parameters

Excess arguments and query parameters

* #3070461: Facet links in modal popup break has a trivial RTBC patch that removes the _wrapper_format parameter server-side
* #3064575: "page" parameter showing up in facet URLs

Miscellaneous

* #2986590: Allow to override view display ajax behavior for the facet block seems to propose to add a setting if facets should participate in ajax
* #3039276: FacetBlockAjaxController needs to make usage of DefaultFacetManager proposes a way to fix lost attachments
* #3002132: Summary block broken
* #3028716: When a URL segment matches possible language the facet breaks
* 🐛 Navigating back in browser doesn't update view with Ajax facets Needs work
* #2976602: Improve performance of render facet
* #3004867: Refresh div after having clicked on an item of a facet block
* infinite_scroll_views 🐛 Views infinite scroll is not working properly with facets Closed: works as designed
* #3160406: Exposed forms with checkboxes don't work correctly if the checkbox value is in the URL Core checkbox problems
* 🐛 Facets with ajax enabled and no source path results in /views/ajax?f... urls RTBC

🌱 Plan
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India shabana.navas

    I'm currently using the latest 2.0 version of Facets (2.0.6) and I'm forced to render my facets in my view page via twig:

        <div class="facets">
          {{ drupal_block('facet_block:facet1', wrapper=false) }}
          {{ drupal_block('facet_block:facet2', wrapper=false) }}
          {{ drupal_block('facet_block:facet3', wrapper=false) }}
        </div>
    

    Rendering the facets this way doesn't work with Ajax and exposed filters. I've got BEF and whenever I try to sort or filter, the facets disappear. It loads fine on initial page load, after that it just disappears. Rendering the facet via the Block UI works just fine and the facets persist after each ajax request.

    I've added tried the following different patches:

    https://www.drupal.org/project/facets/issues/3052574 🐛 Facets with AJAX not working in most of situations RTBC
    https://www.drupal.org/project/facets/issues/3013795 Robustify how ajax finds the facet block Needs review

    But none of them have fixed the issue. Any ideas on what could be wrong?

  • can someone help me with this issue : https://www.drupal.org/project/facets/issues/3350613 🐛 Facet and Search and not working in Ajax view Active

  • 🇫🇷France DuaelFr Montpellier, France
Production build 0.69.0 2024