diff --git a/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php b/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php index 552b736..64b0f3a 100644 --- a/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php +++ b/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php @@ -209,14 +209,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { ); } - // Get pathInfo from request object. - $request_uri = $this->getRequest()->getPathInfo(); - - // Views provides its own custom handling of AJAX form submissions. Usually - // this happens at the same path, but custom paths may be specified in - // $form_state. - $form_path = $form_state->get('path') ? current_path() : $form_state->get('path'); - $view->getStandardButtons($form, $form_state, 'views_ui_rearrange_filter_form'); $form['actions']['add_group'] = array( '#type' => 'submit', @@ -224,7 +216,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#id' => 'views-add-group', '#group' => 'add', '#ajax' => array( - 'path' => $form_path, + 'path' => \Drupal::request()->getRequestUri(), ), );