Bug #75845
closedgetSearchWords does not work with sentences
100%
Description
It's not possible to search for sentences with the extbased-based IndexedSearch.
The SearchController calls the getSearchWord-method before it sets $this->searchData. The getSearchWord-method tries to access this missing data:
https://github.com/TYPO3/TYPO3.CMS/blob/b6c8bb0/typo3/sysext/indexed_search/Classes/Controller/SearchController.php#L196
https://github.com/TYPO3/TYPO3.CMS/blob/b6c8bb0/typo3/sysext/indexed_search/Classes/Controller/SearchController.php#L808
Fix would be to get the sword-list after settings $this->searchData
This bug also appears in previous TYPO3-versions
Updated by Robert Vock over 8 years ago
It is also not possible to use the hook in getSearchWords correctly.
The hook expects a function 'getSearchWords' in the hook object, but calls 'getSearchWords_splitSWords'. To use the hook, you need a class, which has both methods. The first will never be called, but SearchController->hookRequest checks for it's existence:
https://github.com/TYPO3/TYPO3.CMS/blob/b6c8bb0/typo3/sysext/indexed_search/Classes/Controller/SearchController.php#L1391
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68369
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68369
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68369
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68328
Updated by Tina Westner over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4786efbbf0cc761166da872687954b480f9e93bc.
Updated by Tina Westner over 3 years ago
- Related to Task #93738: getSearchWords-Hook has different registration-name and function to call added