The Needs Review Queue Bot β tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Status changed to Needs work
over 1 year ago 1:33pm 19 June 2023 - π·π΄Romania radubutco
Re-rolled it against 11.x, also applies on 10.1.x.
- Status changed to Needs review
over 1 year ago 1:34pm 19 June 2023 - last update
over 1 year ago 29,499 pass, 1 fail - Status changed to Needs work
over 1 year ago 2:08pm 19 June 2023 - πΊπΈUnited States smustgrave
Was previously tagged for tests which still need to happen.
- First commit to issue fork.
- Merge request !57303032353: Patched views per https://www.drupal.org/node/3032353. β (Open) created by COBadger
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 1:15am 10 February 2024 - πΊπΈUnited States COBadger
Re-rolled patch for 10.2.x and added test coverage.
- Status changed to Needs work
about 1 year ago 4:35pm 12 February 2024 - πΊπΈUnited States smustgrave
Tests should be added to the MR. But it needs to be cleaned up as there are now a mix of patches and MRs with no explanation or interdiffs between them.
Also issue summary should follow standard issue template.
- π§πͺBelgium p-neyens
New patch starting from comment 42 β¨ Exposed forms in a block are not currently updated when Ajax filtering is executed Needs work but with adding the missing use.
Error: Class "Drupal\views\Controller\RenderContext" not found in Drupal\views\Controller\ViewAjaxController->ajaxView() (regel 222 van /var/app/web/core/modules/views/src/Controller/ViewAjaxController.php). Error: Class "Drupal\views\Controller\BubbleableMetadata" not found in Drupal\views\Controller\ViewAjaxController->ajaxView()
- π§π¬Bulgaria SimeonKesmev
There are instances where the form ID can have uniquifying suffix, so here is a change to account for that.
The whole approach looks fragile to me as in theory there can be multiple blocks on the page.
Also I have problem with the facets as the parameter "exposed_form_display" does not get attached, as commented in #28. What is the use case for it? - πΊπ¦Ukraine khiminrm
I've fixed bug with empty "exposed_form_display" mentioned in #45
- πΊπ¦Ukraine khiminrm
Noticed bug. when after last the patch the exposed filter block has been refreshed - the exposed form is not submitted by Ajax second time - with page reload.
- πΊπ¦Ukraine khiminrm
I've improved a little the exposed form selector to be more precise.
- πΊπ¦Ukraine khiminrm
And updated selector in javascript in case if there are multiple exposed forms for the same view on one page
- π¨πΏCzech Republic David Urban
I have tested #49 patch with Core 11.1.1 BEF 7.0.5 and Facets 3.0.0. It fixes the issue with Facets not updating after selecting one.
But it creates another issue in which View Footer and Pagination gets multiplied on every Ajax update. Is there any chance you could have a look at it please?
- πΊπ¦Ukraine khiminrm
@david-urban
I didn't notice such bug, but I haven't not tested on Core 11.x yet.
Maybe try to check template for the view. It could be that footer and pagination are outside the view's main 'div' wrapper.
You can check also ViewAjaxController how it replaces content during ajax call so you will have idea what actually is replaced on a page.I've another one bug https://www.drupal.org/node/3163299 β and those patch conflicts with this one in similar lines of code. Have not tried yet though. Trying to compare both patches. I hope those issue's patch will work for all cases.
- πΊπ¦Ukraine khiminrm
When using multiple instances of the exposed form block for the same view on one page, both forms are updated but only for one of them the behaviors are attached. Any ideas how to fix that?
- πΊπ¦Ukraine khiminrm
When exposed form in block, all attributes including classes are moved from the form to the block. In the latest patch only form is replaced. It can produce some bugs. For example if using better_exposed_filters and exclude text fields from autosubmit, it will not work after ajax replace of the exposed form https://git.drupalcode.org/project/better_exposed_filters/-/blob/7.0.x/j.... So it would be better to replace block and not only form.
So we need to improve somehow this:
$response->addCommand(new ReplaceCommand("form[id^=\"views-exposed-form-$view_id\"]", $this->renderer->render($exposed_form)));