- Issue created by @codebymikey
- Merge request !9530Draft: Issue #3475298: Don't build exposed form blocks unless necessary β (Open) created by codebymikey
From the failing tests, it appears the building of the form is at least somewhat necessary in order to appropriately apply the exposed form filter settings against the main view.
Some further thought might is necessary in terms of avoiding the need to build the same form multiple times for the same view.
- π³π±Netherlands Lendude Amsterdam
@codebymikey I see you already tagged π Views hardcodes exposed filter block form ID's which breaks AJAX when the same form is shown multiple times on one page Needs review as related, can you say why this is a different issue, feels duplicate to me at first glance.
It's a bit different mainly due to what they each tackle.
This addresses a potential optimization of the
ExposedFormPluginBase::renderExposedForm()
logic - stopping it from unnecessary building the form and its IDs when the view it's attached to doesn't actually make use of it, whereas the other issue is related to addressing when multiple legitimate variants of the exposed form are placed on the same page.With this issue, only one instance of field
edit-field-item--2
is rendered on the page (which should ideally beedit-field-item
if properly addressed), whereas with that other issue, there can potentially beedit-field-item--2
,edit-field-item--3
since they're legitimate duplicates of the same field, but the form they're attached to is the only thing that isn't unique.