Problem/Motivation

Quoting @dawehner from #2263569-244: Bypass form caching by default for forms using #ajax.:

To be clear, using the master request is almost always semantically the wrong thing to do

We currently use the master request to populate $form['#action'] in \Drupal\Core\Form\FormBuilder::buildFormAction().

Using getCurrentRequest() caused test failures in \Drupal\system\Tests\Form\RedirectTest, but continuing to use the master request with <current> caused failures in \Drupal\system\Tests\System\AccessDeniedTest

This is due to conflicting use cases covered by RedirectTest and AccessDeniedTest. The latter asserts that people are sent to the original destination after a login while the former tests that it is possible for a form to set a redirect destination (even on exception pages).

The problem is that in HEAD the destination query parameter is used to pass the original location into the subrequest where the exception is rendered. However, the destination parameter always overrides any redirect set during form building. Usage of the master request in the FormBuilder does not really resolve that conflict but actually hides it.

Proposed resolution

Do not use the destination parameter in order to pass the original location to the subrequest but rather a deticated one (_exception_location).

Remaining tasks

Review.

User interface changes

N/A

API changes

TBD

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug
Issue priority Normal

Issue fork drupal-2505339

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dawehner’s picture

It's especially funny because both tests do something related to forms on access denied pages, weird.

effulgentsia’s picture

znerol’s picture

Status: Active » Needs review
StatusFileSize
new777 bytes

I very much agree that getMasterRequest() is not correct there. Let's see what breaks.

Status: Needs review » Needs work

The last submitted patch, 3: stop_using-2505339-3.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new1.36 KB
new836 bytes

The problem is that 403/404 is rendered in a subrequest and the URI includes the path of the main request in the destination query parameter (why?). If that ends up in the form action, then that will win over the redirect set by RedirectBlockForm::submitForm().

Status: Needs review » Needs work

The last submitted patch, 5: stop_using-2505339-5.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB
new1.07 KB

Special case exception subscriber subrequest. Maybe this needs to be configurable in some way? The destination is useful for login forms on 403 pages. I feel it is bad for most other things, like, e.g. a search field on the 404 one.

Status: Needs review » Needs work

The last submitted patch, 7: stop_using-2505339-7.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new4.86 KB
new4.78 KB

The redirection behavior after form submissions from exception pages should be left up to the implementing form. The login form already special cases that case in HEAD, presumably in order to fix problems when a 403 is rendered as a result of a POST request. In that case the destination parameter is missing from the URL (its added to POST parameters by the exception handler).

In this patch:

  1. Do not set destination in the html exception handler but instead _exception_location in order to prevent an automatic redirect.
  2. Fix the login form to respect that query/request parameter.
dawehner’s picture

It would be great to get rid of that hack indeed! Thank you znerol

  1. +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
    @@ -128,10 +128,10 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st
    +        $sub_request = Request::create($url, 'POST', ['_exception_location' => $this->redirectDestination->get(), '_exception_statuscode' => $status_code] + $request->request->all(), $request->cookies->all(), [], $request->server->all());
    

    Can we add a comment somewhere explaining why setting destination itself doesn't work?

  2. +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
    @@ -128,10 +128,10 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st
    +        $sub_request = Request::create($url, 'GET', $request->query->all() + ['_exception_location' => $this->redirectDestination->get(), '_exception_statuscode' => $status_code], $request->cookies->all(), [], $request->server->all());
    
    +++ b/core/modules/user/src/Form/UserLoginForm.php
    @@ -135,16 +135,17 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +    if ($original_location = $this->getRequest()->get('_exception_location')) {
    

    It would be nice if we could introduce a constant for _exception_location

Status: Needs review » Needs work

The last submitted patch, 9: stop_using-2505339-9.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new7.64 KB
new2.87 KB
znerol’s picture

StatusFileSize
new9.74 KB
new5.07 KB

Addresses #10.

znerol’s picture

StatusFileSize
new11.58 KB
new1.84 KB

Also fix semantics in ExternalFormUrlTest.

The last submitted patch, 13: stop_using-2505339-13.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 14: stop_using-2505339-14.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new11.59 KB
new1.02 KB

uhm.

Status: Needs review » Needs work

The last submitted patch, 17: stop_using-2505339-17.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new11.59 KB
new989 bytes
znerol’s picture

StatusFileSize
new11.63 KB

Reroll.

znerol’s picture

Issue summary: View changes
znerol’s picture

Issue summary: View changes
kentr’s picture

Status: Needs review » Needs work
StatusFileSize
new1.19 KB
new470 bytes

Patch in #20 failed for me on 8.0.2.

Reject files are attached (renamed to *_.rej_.txt).

patching file core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
patching file core/lib/Drupal/Core/Form/FormBuilder.php
Hunk #1 succeeded at 829 (offset 107 lines).
patching file core/modules/system/src/Tests/Form/ExternalFormUrlTest.php
patching file core/modules/system/src/Tests/Routing/DestinationTest.php
patching file core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php
Hunk #1 FAILED at 9.
Hunk #2 succeeded at 150 (offset 1 line).
1 out of 2 hunks FAILED -- saving rejects to file core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php.rej
patching file core/modules/system/tests/modules/system_test/system_test.routing.yml
patching file core/modules/user/src/Form/UserLoginForm.php
Hunk #1 FAILED at 8.
Hunk #2 succeeded at 135 (offset -1 lines).
1 out of 2 hunks FAILED -- saving rejects to file core/modules/user/src/Form/UserLoginForm.php.rej
patching file core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
kentr’s picture

Status: Needs work » Needs review
StatusFileSize
new11.64 KB

Rerolled the patch from #20.

wim leers’s picture

Patch is looking good overall.

  1. +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
    @@ -45,6 +45,16 @@ class DefaultExceptionHtmlSubscriber extends HttpExceptionSubscriberBase {
    +   * URL query attribute to specify the status code resulting from an exception.
    ...
    +   * URL query attribute to specify the location where an exception occured.
    

    s/URL query/Request/

  2. +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
    @@ -127,11 +137,22 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st
    +      // to redirect to the original location after a successfull login. Note
    

    s/successfull/successful/

  3. +++ b/core/lib/Drupal/Core/Form/FormBuilder.php
    @@ -829,9 +829,7 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state) {
       protected function buildFormAction() {
    -    // @todo Use <current> instead of the master request in
    -    //   https://www.drupal.org/node/2505339.
    -    $request = $this->requestStack->getMasterRequest();
    +    $request = $this->requestStack->getCurrentRequest();
    

    This definitely makes more sense.

  4. +++ b/core/modules/system/src/Tests/Form/ExternalFormUrlTest.php
    @@ -74,10 +74,11 @@ protected function setUp() {
    +    // Create a new request which has a request uri with multiple leading
    

    s/uri/URI/

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

berdir’s picture

StatusFileSize
new777 bytes
new2.18 KB

Trying to reroll this, would be useful for better cache performance of the login block (#2867703: Change #action in UserLoginBlock to a #lazy_builder to avoid the route cache context , #2847972: Missing context on UserLoginBlock causes render-cache poisoning of the "destination").

As far as I see, #2595695: 4xx handling using subrequests: no longer able to vary by URL basically already solved a lot of what we are trying todo here, except it kept the default destination argument, and just added the _exception_statuscode.

Trying to go back to a minimal patch, then we can see from there if we still need to do something more.

Also combining it with the patch from #2867703: Change #action in UserLoginBlock to a #lazy_builder to avoid the route cache context to see if that works too.

Status: Needs review » Needs work

The last submitted patch, 29: stop_using-2505339-29-combined.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review

So this is passing (yay), but it doesn't fix the user login form test.

Checked that test and the problem is that we explicitly need to force the destination even on non 403 pages, so this won't help with that. That means we definitely need a custom lazy builder there, fair enough.

But it also means that this seems to be good to go like this?

berdir’s picture

It also didn't fix it because the user login form patch was completely bogus and didn't do what it should have done. But it wouldn't have done it even if it would have been correct.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

amateescu’s picture

StatusFileSize
new783 bytes

Since #2867703: Change #action in UserLoginBlock to a #lazy_builder to avoid the route cache context is in, the non-combined patch from #29 should be all that's left to do here. Let's try it.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Nice, this should be good to go based on #31.

andypost’s picture

I bet it needs test coverage

amateescu’s picture

I'm not sure we need any additional test coverage, #29/#31 implies that we don't.

wim leers’s picture

If this broke something, we'd have a zillion tests failing. 😄

I agree with this not needing test coverage.

andypost’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.64 KB

I think this is better fix cos
- it documents what actually expected
- this method mostly empty but using external service dependency

Actually this method require only request object to but actually supposed to hide implementation details:

- build URI from request removing "ajax implementation nits" - which has follow-up to be removed #2504709: Prevent _wrapper_format and ajax_form parameters from bleeding through to generated URLs
- checking for // (guessing the request stack can contain weird request object) - maybe it should be cleaned in follow-up

As method protected it needs unit test coverage and probably could be removed (BC?)

https://www.drupal.org/core/d8-bc-policy#protected-methods allows to change argument

core8$ git grep renderPlaceholderFormAction

core/lib/Drupal/Core/Form/FormBuilder.php:648:  public function renderPlaceholderFormAction() {
core/lib/Drupal/Core/Form/FormBuilder.php:696:        '#lazy_builder' => ['form_builder:renderPlaceholderFormAction', []],
core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php:152:      // @see \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php:103:        '#lazy_builder' => ['form_builder:renderPlaceholderFormAction', []],
core/modules/user/src/Plugin/Block/UserLoginBlock.php:108:      '#lazy_builder' => ['\Drupal\user\Plugin\Block\UserLoginBlock::renderPlaceholderFormAction', []],
core/modules/user/src/Plugin/Block/UserLoginBlock.php:151:   * @see \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
core/modules/user/src/Plugin/Block/UserLoginBlock.php:153:  public static function renderPlaceholderFormAction() {
andypost’s picture

Version: 8.6.x-dev » 8.7.x-dev
StatusFileSize
new1.52 KB
new3.16 KB

Here's a test

The last submitted patch, 42: 2505339-42-test-only.patch, failed testing. View results

amateescu’s picture

Version: 8.7.x-dev » 8.6.x-dev
Status: Needs review » Reviewed & tested by the community

This approach looks fine as well, thanks for the test :)

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

I don't see the benefit of the changes to Formbuilder in #41 over #36. Changing the method signature is not necessary to do the fix and is unnecessarily disruptive. If there are compelling reasons down the line to make it the way it is in #41 then we should do this then. +1 for the new test though.

alexpott’s picture

Version: 8.6.x-dev » 8.7.x-dev
Issue tags: +Needs change record

I also think that this change has caused some disruption to core forms in the past we should have a CR and only commit to the development branch and have some idea if major contrib is affected.

andypost’s picture

@alexpott why chamging protected method you find disruptive?

alexpott’s picture

@andypost because if someone has extended the FormBuilder class this change might break them. And whilst this is not public API we should still seek to minimise breaking change unless it is truly necessary. I don't think it is in this issue. Maybe a future issue it will be but we should justify that on that issue and not second guess ourselves here.

jibran’s picture

if someone has extended the FormBuilder class this change might break them.

In which case someone would extend FormBuilder class? Can we have an example, please?

amateescu’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.26 KB

Let's not make perfect the enemy of good, it's really not worth it for such a small @todo cleanup :)

This patch contains the fix from #36 with the test from #42.

alexpott’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Needs work

Okay. So now looking at the history of this issue - what's the chance of this breaking contrib in the same way the core has been broken over the years. Like what happens if contrib has something where it would need to do the corollary of #2867703: Change #action in UserLoginBlock to a #lazy_builder to avoid the route cache context . At the very least we need a change record that details the implications for contrib - it would also be good to know what might break - especially if popular contrib is affected.

dawehner’s picture

+++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
@@ -878,6 +878,39 @@ public function providerTestFormTokenCacheability() {
 
+  /**
+   * @covers ::renderPlaceholderFormAction
+   * @covers ::buildFormAction
+   *
+   * @dataProvider providerTestRenderPlaceholderFormAction
+   */
+  public function testRenderPlaceholderFormAction($expected, $request_uri) {
+    $request = new Request([], [], [], [], [], ['REQUEST_URI' => $request_uri]);
+    $request->headers->set('HOST', 'example.com');
+    $this->requestStack->push($request);
+    $element = $this->formBuilder->renderPlaceholderFormAction();
+    $this->assertEquals($expected, $element['#markup']);
+  }
+
+  /**
+   * Data provider for testRenderPlaceholderFormAction.
+   *
+   * @return array[]
+   *   Items are arrays of two items:
+   *   - The expected result;
+   *   - The request URI to create a request with.
+   */
+  public function providerTestRenderPlaceholderFormAction() {
+    return [
+      ['/path', '/path'],
+      ['/path?t=1', '/path?t=1'],
+      // Cases of CSRF protection in buildFormAction() method.
+      ['http://example.com//path', '//path'],
+      ['http://example.com///path', '///path'],
+      ['http://example.com///path', '///path?t=1'],
+    ];
+  }
+

I'm a bit dubious about this test coverage. For me this doesn't really prove anything, beside the code being implemented as it is. Is there a way to test more something which is described in the issue summary?

Using getCurrentRequest() caused test failures in \Drupal\system\Tests\Form\RedirectTest, but continuing to use the master request with caused failures in \Drupal\system\Tests\System\AccessDeniedTest

This is due to conflicting use cases covered by RedirectTest and AccessDeniedTest. The latter asserts that people are sent to the original destination after a login while the former tests that it is possible for a form to set a redirect destination (even on exception pages).

The problem is that in HEAD the destination query parameter is used to pass the original location into the subrequest where the exception is rendered. However, the destination parameter always overrides any redirect set during form building. Usage of the master request in the FormBuilder does not really resolve that conflict but actually hides it.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

andypost’s picture

Related issues: +#3087509: Convert comment reply subrequest to new pager manager

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

heddn’s picture

+++ b/core/lib/Drupal/Core/Form/FormBuilder.php
@@ -842,9 +842,7 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state) {
+    $request = $this->requestStack->getCurrentRequest();
     $request_uri = $request->getRequestUri();

Ran into this today. We've got inbound/outbound path rewriting going on and Forms set the action to the wrong URL. I believe that using the <current> route would fix things for us.

I think the URL should be generated the same way it is generated in RedirectDestination::get(). i.e.

$query = $this->requestStack->getCurrentRequest()->query;
$request_uri = $this->urlGenerator->generateFromRoute('<current>', [], ['query' => UrlHelper::filterQueryParameters($query->all())]);
heddn’s picture

StatusFileSize
new2.73 KB

No interdiff as the tests didn't change and the approach used in the form builder is entirely different.

heddn’s picture

Status: Needs work » Needs review

No interdiff as the tests didn't change and the approach used in the form builder is entirely different.

Status: Needs review » Needs work

The last submitted patch, 60: 2505339-60.patch, failed testing. View results

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Title: Stop using getMasterRequest() to build $form['#action'] » Stop using getMainRequest() to build $form['#action']

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Btw #50 patch looks enough

ravi.shankar’s picture

StatusFileSize
new2.27 KB
new1.62 KB

Added reroll of patch #50 on Drupal core 9.5.x. as patch #50 was not applying. I think it can be reviewed if It passes the test as per comment 366.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

still needs CR and MR for 11.x

andypost’s picture

Needs only CR now

andypost’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

Added CR draft which needs better wording

smustgrave’s picture

Status: Needs review » Needs work

Small change requests

sourabhjain made their first commit to this issue’s fork.

andypost’s picture

Status: Needs work » Needs review

fixed

bramdriesen’s picture

Status: Needs review » Reviewed & tested by the community

Code wise this looks good! All tests are passing 👍

Also updated the readability of the CR a little bit. Not really sure if the CR needs more info or not.

I think we can set this to RTBC now.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

I still don't think @alexpott or @dawehner's comments from #51 and #52 have been addressed. The CR doesn't really explain why you might be affected by this nor what you should do if you are, and the test coverage is very specific to the fix; it doesn't really prove anything about the original problem.

joachim’s picture

This is blocking #3566881: Add a submitForm() method to HttpKernelUiHelperTrait, because in a kernel test, the main request is the request from PHPUnit whose path is always '/'.

Should this be escalated to a bug in light of this?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.