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.
The values disappear after the form has been submitted. However it works fine with usual exposed form (when it is not in a block).
Comment | File | Size | Author |
---|---|---|---|
#18 | interdiff-2596649-14-18.txt | 537 bytes | rakesh.gectcr |
#18 | exposed_form_does_not-2596649-18.patch | 3.19 KB | rakesh.gectcr |
#14 | exposed_form_does_not-2596649-14.patch | 3.2 KB | legolasbo |
#14 | exposed_form_does_not-2596649-14-tests-only.patch | 1.37 KB | legolasbo |
#13 | interdiff-12-13.txt | 981 bytes | legolasbo |
Comments
Comment #2
rakesh.gectcrComment #3
alexej_d CreditAttribution: alexej_d commentedRelated: Exposed form in a block rendered on another page than the view is displayed breaks the "Remember the last selection" option.
Comment #4
Chi CreditAttribution: Chi commentedComment #5
dawehnerIsn't that indeed a duplicate of #2551431: Exposed form in a block rendered on another page than the view is displayed breaks the "Remember the last selection" option.
Comment #6
Chi CreditAttribution: Chi commented@dawehner, the bugs are different from each other but I admit they may have the same primary reason.
Comment #7
g089h515r806 CreditAttribution: g089h515r806 commentedI have the same problem. it seems that block form has been cached, and i co not know how to disable cache for a specific block.
https://www.drupal.org/node/2603244
At last I solve this issue by using jquery:
Comment #8
legolasboBug reproduced + fixed locally.
Currently extending test coverage.
Comment #9
legolasboLet's see what testbot has to say about it so far.
Still working on new tests.
Comment #10
legolasboFound and fixed a null reference exception in previous patch.
Comment #12
legolasboMoved cache context generation to
ExposedFormPluginBase::getCacheContexts()
which seems more sensible.Comment #13
legolasboStill new to this cacheContexts thing. The block should expose them, not it's render array.
Comment #14
legolasboAdded tests.
Comment #15
legolasboWhile working on this I found out that the filters could provide more specific cache contexts. See #2605038: Views Exposed Filters should provide more specific cache contexts. for more info.
Comment #17
dawehnerJust a small nitpick ...
nitpick: it should be
{@inheritdoc}
Comment #18
rakesh.gectcr@dawehner
I update your comment
Comment #19
rakesh.gectcrComment #20
dawehnerThank you!
Comment #23
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!
Comment #26
Wim Leers