Skip to content
Snippets Groups Projects
Unverified Commit 8b80368c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2990664 by nuez, seanB, cbccharlie, Wim Leers, deepaksingh05, Pancho,...

Issue #2990664 by nuez, seanB, cbccharlie, Wim Leers, deepaksingh05, Pancho, Chi, wwedding, Berdir, phenaproxima: Media library does not work when Drupal is installed into a sub-directory
parent a6596677
No related branches found
No related tags found
No related merge requests found
......@@ -86,11 +86,10 @@ public function viewsForm(array &$form, FormStateInterface $form_state) {
// Currently the default URL for all AJAX form elements is the current URL,
// not the form action. This causes bugs when this form is rendered from an
// AJAX path like /views/ajax, which cannot process AJAX form submits.
$url = parse_url($form['#action'], PHP_URL_PATH);
$query = $this->view->getRequest()->query->all();
$query[FormBuilderInterface::AJAX_FORM_REQUEST] = TRUE;
$form['actions']['submit']['#ajax'] = [
'url' => Url::fromUserInput($url),
'url' => Url::fromRoute('media_library.ui'),
'options' => [
'query' => $query,
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment