diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index b510d1b..060ea12 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -534,7 +534,7 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state) { // Only update the action if it is not already set. if (!isset($form['#action'])) { - $form['#action'] = $this->requestStack->getCurrentRequest()->getRequestUri(); + $form['#action'] = $this->requestStack->getMasterRequest()->getRequestUri(); } // Fix the form method, if it is 'get' in $form_state, but not in $form.