diff --git a/src/Display/DisplayPluginBase.php b/src/Display/DisplayPluginBase.php index e704e90..74b566a 100644 --- a/src/Display/DisplayPluginBase.php +++ b/src/Display/DisplayPluginBase.php @@ -103,7 +103,7 @@ public function getIndex() { */ public function getPath() { $plugin_definition = $this->getPluginDefinition(); - return Url::fromUserInput('/' . $plugin_definition['path']); + return Url::fromUserInput($plugin_definition['path']); } /** diff --git a/src/Plugin/search_api/display/ViewsPageDisplayDeriver.php b/src/Plugin/search_api/display/ViewsPageDisplayDeriver.php index 7564c76..3fd1d6b 100644 --- a/src/Plugin/search_api/display/ViewsPageDisplayDeriver.php +++ b/src/Plugin/search_api/display/ViewsPageDisplayDeriver.php @@ -63,7 +63,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { 'description' => $view->get('description') ? $this->t('%view_description - Represents the page display %display_title of view %view_name.', array('%view_name' => $view->label(), '%view_description' => $view->get('description'), '%display_title' => $display_info['display_title'])) : $this->t('Represents the page display %display_title of view %view_name.', array('%view_name' => $view->label(), '%display_title' => $display_info['display_title'])), 'view_id' => $view->id(), 'view_display' => $name, - 'path' => $display->getPath(), + 'path' => '/' . $display->getPath(), 'index' => $index->id(), ) + $base_plugin_definition;