Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi anyone can help me out from this issue, i am using drupal 8.2x better exposed filter and configured auto submit.when value change from my filter ajax results are not showing.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#17 | 2846222-15-16.interdiff.txt | 1.55 KB | mikeker |
#15 | 2846222-15.patch | 3.83 KB | dmsmidt |
#15 | interdiff-11-15.txt | 3.8 KB | dmsmidt |
#13 | 2846222-13.patch | 8.64 KB | dmsmidt |
#13 | interdiff-11-13.txt | 8.38 KB | dmsmidt |
Comments
Comment #2
stewest CreditAttribution: stewest at Amazee Labs commented+1 except I'm using the newest 8.x-3.0-alpha2 on Drupal 8.2.6
Comment #3
Phonoman CreditAttribution: Phonoman commented+1 also using the 8.x-3.0-alpha2 (2017-Jan-16) on Drupal 8.2.6 versions.
Comment #4
gcalex5 CreditAttribution: gcalex5 at Inclind Inc commented+1 also experiencing this
Comment #5
desammer CreditAttribution: desammer commented+1 the same for me
Comment #6
spheresh CreditAttribution: spheresh commentedIt works fine for me.
Drupal - 8.2.6
Better Exposed Filters - 8.x-3.0-alpha2
Guys, would you give me more details?
Comment #7
gcalex5 CreditAttribution: gcalex5 at Inclind Inc commentedspheresh;
Drupal 8.2.5, Better Exposed Filters 8.x-3.0-alpha2
I have a view(page) with an exposed filter(drop down), Ajax enabled, and the form exposed as a block.
In better exposed filters I have autosubmit + hide submit button.
Initially, I have the exposed block form on one page(front page), which when I select a dropdown option from it, it redirects to the views page just fine. However, when selecting another option from the exposed block form on that page the options do not update.
Comment #8
mikeker CreditAttribution: mikeker as a volunteer commentedThere's not a lot to go on in the bug report, as @spheresh says in #6. Take a look at #2776615: Exposed filters break on blocks with AJAX filters, if your exposed filters are in a block and please test and report back on the patch in that issue.
See also: #2798951: Multi select filter w/ ajax.
Thanks!
Comment #9
mikeker CreditAttribution: mikeker as a volunteer commentedComment #10
dietr_ch CreditAttribution: dietr_ch at EntityOne commentedHello
As @gcalex5 said in #7, the issue occurs only when the exposed form is shown in a block. The
data-bef-auto-submit-full-form
attribute is then not applied to the form element, but to a wrapping div (with classviews-exposed-form
).auto_submit.js
only registers a change event function toform[data-bef-auto-submit-full-form]
, which works when the form is not in a block.I attached a patch that also adds
[data-bef-auto-submit-full-form] form
to the set of matched forms.Dietrich
Comment #11
dietr_ch CreditAttribution: dietr_ch at EntityOne commentedHello again
Apparently, the autosubmit is not triggered on textfields. This is because jQuery.once should be used as e.g.
$('div.calendar').once('name').each(function() { ... })
, while the existing code passes the function as a second argument toonce()
. Maybe this was changed in the version of the plugin in D8 (currently 2.1.1)? Also, thecore/jquery.once
dependency is missing from theauto_submit
library.In attachment a new patch that solves these issues.
Dietrich
Comment #12
dietr_ch CreditAttribution: dietr_ch at EntityOne commentedComment #13
dmsmidtThe auto submit is indeed problematic in a lot of cases.
Here is a rewrite/simplification, also using Drupal.debounce instead of custom logic.
Edit: ignore those patches! I left a ^ in my diff command.
Comment #14
dmsmidtWhat would be nice: focus the field that triggered the autosubmit again after submit completes.
This helps when typing text or when using keys to navigate through select lists.
But that would be a separate issue and needs to be extensively tested for AJAX/non-AJAX views, and multiple views on a page.
Comment #15
dmsmidtAnd the patches again.
Comment #17
mikeker CreditAttribution: mikeker as a volunteer commentedCommitted with a few changes to comments and to add back in the selector that makes this work when an exposed form is used as a block.
Thank you everyone for your work and patience!