#107192Exception When Adding Multiple Search Fields to FileSearchDemand
Description
When creating a FileSearchDemand and adding multiple search fields, an exception is thrown:
TYPO3\CMS\Core\Schema\SearchableSchemaFieldsCollector::getFields(): Argument #2 ($searchFields) must be of type array, string given, called in /usr/share/nginx/html/typo3-web/vendor/typo3/cms-core/Classes/Resource/Search/QueryRestrictions/SearchTermRestriction.php on line 60
*Background:*
The method addSearchField() expects a single search field as a string (see: TYPO3 Documentation – addSearchField).
However, later in the execution — e.g. in SearchTermRestriction via SearchableSchemaFieldsCollector->getFields() — the $searchFields parameter is expected to be an array. This leads to a type mismatch and triggers the exception.
Reviews 2
History 24
-
Gerrit Code Review pushed patch set 1 for main to change 90220 status
NewUnder Review 08/01/25, 13:55 -
Gerrit Code Review pushed patch set 1 for 13.4 to change 90313 08/11/25, 10:30
-
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % 08/11/25, 10:35 -
Benni Mack changed status
ResolvedClosed 12/02/25, 13:58
Applied in changeset commit:ada5a93437c1b878251b29f9e4aaf749ee9b4af6.