Skip to content
Snippets Groups Projects
Commit d55f5a47 authored by Gianluca Piccolo's avatar Gianluca Piccolo Committed by Christian Kuhn
Browse files

[BUGFIX] Fix display of indexed search advanced search fields

There were some advanced search fields in indexed search that
disappeared after the last update.

In SearchController, method processExtendedSearchParameters, there were
some non-existing variables that were used in some conditions.
With this patch, those variables are initialized before the conditions
and all the advanced search fields in indexed search are shown again.

Releases: master, 8.7
Resolves: #84995
Change-Id: I69aef4c7a3d869d519e84866929f4724c61eabd7
Reviewed-on: https://review.typo3.org/56958


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 8e6aa670
Branches
Tags
No related merge requests found
......@@ -1514,38 +1514,34 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
/**
* Process variables related to indexed_search extendedSearch needed by frontend view.
* Populate select boxes and setting some flags.
* The returned data should be passed into the view by assignMultiple()
* The returned data can be passed directly into the view by assignMultiple()
*
* @return array Variables to pass into the view so they can be used in fluid template
*/
protected function processExtendedSearchParameters()
{
// "Search for"
$extendedSearchParameters['allSearchTypes'] = $this->getAllAvailableSearchTypeOptions();
$extendedSearchParameters['allDefaultOperands'] = $this->getAllAvailableOperandsOptions();
$extendedSearchParameters['showTypeSearch'] = !empty($allSearchTypes) || !empty($allDefaultOperands);
// "Search in"
$extendedSearchParameters['allMediaTypes'] = $this->getAllAvailableMediaTypesOptions();
$extendedSearchParameters['allLanguageUids'] = $this->getAllAvailableLanguageOptions();
$extendedSearchParameters['showMediaAndLanguageSearch'] = !empty($allMediaTypes) || !empty($allLanguageUids);
// Sections
$extendedSearchParameters['allSections'] = $this->getAllAvailableSectionsOptions();
// Free Indexing Configurations
$extendedSearchParameters['allIndexConfigurations'] = $this->getAllAvailableIndexConfigurationsOptions();
// Sorting
$extendedSearchParameters['allSortOrders'] = $this->getAllAvailableSortOrderOptions();
$extendedSearchParameters['allSortDescendings'] = $this->getAllAvailableSortDescendingOptions();
$extendedSearchParameters['showSortOrders'] = !empty($allSortOrders) || !empty($allSortDescendings);
// Limits
$extendedSearchParameters['allNumberOfResults'] = $this->getAllAvailableNumberOfResultsOptions();
$extendedSearchParameters['allGroups'] = $this->getAllAvailableGroupOptions();
return $extendedSearchParameters;
$allSearchTypes = $this->getAllAvailableSearchTypeOptions();
$allDefaultOperands = $this->getAllAvailableOperandsOptions();
$allMediaTypes = $this->getAllAvailableMediaTypesOptions();
$allLanguageUids = $this->getAllAvailableLanguageOptions();
$allSortOrders = $this->getAllAvailableSortOrderOptions();
$allSortDescendings = $this->getAllAvailableSortDescendingOptions();
return [
'allSearchTypes' => $allSearchTypes,
'allDefaultOperands' => $allDefaultOperands,
'showTypeSearch' => !empty($allSearchTypes) || !empty($allDefaultOperands),
'allMediaTypes' => $allMediaTypes,
'allLanguageUids' => $allLanguageUids,
'showMediaAndLanguageSearch' => !empty($allMediaTypes) || !empty($allLanguageUids),
'allSections' => $this->getAllAvailableSectionsOptions(),
'allIndexConfigurations' => $this->getAllAvailableIndexConfigurationsOptions(),
'allSortOrders' => $allSortOrders,
'allSortDescendings' => $allSortDescendings,
'showSortOrders' => !empty($allSortOrders) || !empty($allSortDescendings),
'allNumberOfResults' => $this->getAllAvailableNumberOfResultsOptions(),
'allGroups' => $this->getAllAvailableGroupOptions()
];
}
/**
......
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