diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php index ada6e59..5e2eee9 100644 --- a/core/modules/views/src/Form/ViewsExposedForm.php +++ b/core/modules/views/src/Form/ViewsExposedForm.php @@ -116,7 +116,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#id' => drupal_html_id('edit-submit-' . $view->storage->id()), ); - $form['#action'] = $view->hasUrl() ? $view->getUrl()->toString() : Url::fromRoute('')->toString(); + $form['#action'] = $view->hasUrl() ? $view->getUrl()->toString() : Url::fromRoute('')->toString(); $form['#theme'] = $view->buildThemeFunctions('views_exposed_form'); $form['#id'] = Html::cleanCssIdentifier('views_exposed_form-' . String::checkPlain($view->storage->id()) . '-' . String::checkPlain($display['id'])); diff --git a/core/modules/views/src/Form/ViewsForm.php b/core/modules/views/src/Form/ViewsForm.php index 8ad7c2d..cdf39eb 100644 --- a/core/modules/views/src/Form/ViewsForm.php +++ b/core/modules/views/src/Form/ViewsForm.php @@ -133,7 +133,8 @@ public function buildForm(array $form, FormStateInterface $form_state, ViewExecu $query = $this->requestStack->getCurrentRequest()->query->all(); $query = UrlHelper::filterQueryParameters($query, array(), ''); - $form['#action'] = $view->getUrl()->setOption('query', $query)->toString(); + $options = array('query' => $query); + $form['#action'] = $view->hasUrl() ? $view->getUrl()->setOptions($options)->toString() : Url::fromRoute('')->setOptions($options)->toString(); // Tell the preprocessor whether it should hide the header, footer, pager... $form['show_view_elements'] = array( '#type' => 'value', diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 68de7f2..f6bf9e1 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -738,6 +738,9 @@ public function getRoutedDisplay() { if ($display_id && $this->view->displayHandlers->has($display_id) && is_object($this->view->displayHandlers->get($display_id))) { return $this->view->displayHandlers->get($display_id)->getRoutedDisplay(); } + + // No routed display exists, so return null + return null; } /** diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php index c91416e..ab930ce 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php @@ -221,7 +221,7 @@ public function getPath(); * block display links to a page display, the page display will be returned * in both cases. * - * @return static|null + * @return \Drupal\views\Plugin\views\display\DisplayRouterInterface|null */ public function getRoutedDisplay(); diff --git a/core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php b/core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php index 80d86d5..65328ed 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php +++ b/core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php @@ -49,7 +49,7 @@ public function getUrlInfo(); /** * Returns the route name for the display. * - * The default route name for a display is views.view_id.display_id. Some + * The default route name for a display is views.$view_id.$display_id. Some * displays may override existing routes; in these cases, the route that is * overridden is returned instead. * diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php index a9c052f..3a8473e 100644 --- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php @@ -506,7 +506,7 @@ public function getRouteName() { } /** - * {@inheritdoc + * {@inheritdoc} */ public function getAlteredRouteNames() { return $this->state->get('views.view_route_names') ?: array();