Commit 4786efbb authored by Tina Westner's avatar Tina Westner Committed by Christian Kuhn
Browse files

[BUGFIX] Fixes search with search type "sentence"

With this commit the method getSearchWords is called
after initializing $this->searchData, which is used there (only when
searchType is 20 - search for "sentence")

Resolves: #75845
Releases: master, 10.4
Change-Id: Ic344f05fb6f4ac1ef496907edfc4fa0e49010401

Tested-by: default avatarTYPO3com <>
Tested-by: core-ci's avatarcore-ci <>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
parent d25eeccd
......@@ -231,7 +231,6 @@ class SearchController extends ActionController
if ($searchData['sword_prev_include'] && $searchData['sword_prev']) {
$this->setSword(trim($searchData['sword_prev']) . ' ' . $this->getSword());
$this->searchWords = $this->getSearchWords($searchData['defaultOperand']);
// This is the id of the site root.
// This value may be a commalist of integer (prepared for this)
$this->searchRootPageIdList = (int)$GLOBALS['TSFE']->config['rootLine'][0]['uid'];
......@@ -249,6 +248,8 @@ class SearchController extends ActionController
$this->searchRepository = GeneralUtility::makeInstance(IndexSearchRepository::class);
$this->searchRepository->initialize($this->settings, $searchData, $this->externalParsers, $this->searchRootPageIdList);
$this->searchData = $searchData;
// $this->searchData is used in $this->getSearchWords
$this->searchWords = $this->getSearchWords($searchData['defaultOperand']);
// Calling hook for modification of initialized content
if ($hookObj = $this->hookRequest('initialize_postProc')) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment