Commit 80d8698d authored by Jérôme Danthinne's avatar Jérôme Danthinne
Browse files

Use getPathInfo() instead of server->get('REDIRECT_URL')

parent 39bb5c9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ function custom_search_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $

      $config = \Drupal::config('custom_search.results')->getRawData();
      $page_config = FALSE;
      $path = substr(\Drupal::request()->server->get('REDIRECT_URL'), 7 + strlen(base_path()));
      $path = substr(\Drupal::request()->getPathInfo(), 8);

      // Search for the config of this page
      foreach ($config as $c) {