BigPipe cannot handle (GET) form redirects (EnforcedResponseException)

Created on 19 August 2022, almost 2 years ago
Updated 17 June 2024, 9 days ago

Problem/Motivation

When a view with an exposed form (or another form using GET as #method) is being rendered using a lazy builder and that form throws a EnforcedResponseException (for example when the exposed form reset button is pressed), big pipe does not handle this exception; the redirect will not happen.

Steps to reproduce

Using Views Reference Field and a view with exposed filters and ajax:

  1. Enable Views
  2. Install module BEF
  3. Create a view with some exposed filters, enable ajax, enable BEF and activate showing the Reset button.
  4. Install module Views Reference Field (> 8.x-2.0-beta4)
  5. Create a content type with a field View Reference and configure it to allow selecting the view created.
  6. Add a node and select the view
  7. View the page and use some exposed filters, then when the reset button appears, press it

It will reload the page showing an error instead of the view.

Proposed resolution

Remaining tasks

Write test
code review

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
BigPipeย  โ†’

Last updated about 13 hours ago

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands casey

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    For the tests in #4

    Also the issue summary should be updated to include proposed solution

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom scott_euser

    We have noticed this issue is reproduce-able with the following setup:

    Views reference to eg let someone add a View Block to a node (BigPipe
    Views ajax history in place to make Views use 'GET'
    Better exposed filters enable Reset button
    Attempt to click the Reset button, and failure occurs

    Hoping to investigate and reproduce this well enough without a series of contrib modules, but for now hopefully this is at least somewhat helpful for others.

    The issue only occurs from Views Reference > beta4 as noted here https://www.drupal.org/project/viewsreference/issues/3380691 ๐Ÿ› Issue 2919092 breaks BC and causes issues for existing sites Needs review

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada efrainh

    Hi, I confirm this issue is happening when using Better exposed filters with the reset button + Views Reference Field 8.x-2.0-beta6.
    I tested the patch #3 and it kind of worked, but now when we press the Reset button, it redirects first to a URL with a query string and then to the page without the query string, so it reloads twice.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia AditiVB

    Aditi Saraf โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Wim Leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    @scott_euser Thank you! That's very helpful! Any chance you could write a test that reproduces this? ๐Ÿ™

    @efrainh Thank you! It's also very helpful to know that the patch in #3 is an incomplete fix.

  • Pipeline finished with Failed
    9 days ago
    Total: 261s
    #200911
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom scott_euser

    scott_euser โ†’ changed the visibility of the branch 11.0.x to hidden.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom scott_euser
  • Pipeline finished with Success
    9 days ago
    Total: 598s
    #200918
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom scott_euser

    Okay I need to work on reproducing this without Views Reference Field module, a bit down my queue though unfortunately.

    On the plus side, have managed to get a lot more test coverage into Views Reference Field module itself on (I assume everyone here is here because of some combination of that module and/or Views Ajax History) so hopefully welcome news!

Production build 0.69.0 2024