Bug #97986
closedEXT:indexed_search search result description umlaut issue
100%
Description
For a search term with an umlaut (e.g. "Ü"), the page is found, but the description does not output the relevant text snippet, but simply the text end of the page.
If you omit the umlaut from the search term, everything looks as it should (search term "beltat"):
With the umlaut, only the end of the text is output as the description (search term "Übeltat"):
Files
Updated by Tomas Norre Mikkelsen almost 2 years ago
I can reproduce this with words on the page like überhaupt, Ärmel etc. But words like Brühe, is not a problem.
I have also tested with danish special chars like: æøå Words starting with special chars like: Æble doesn't work, but words like rød do.
So it's a problem when words starting with a special char.
Updated by Tomas Norre Mikkelsen almost 2 years ago
I have found the problem, but not a solution yet.
$parts = preg_split('/' . $regExString . '/i', ' ' . $str . ' ', 20000, PREG_SPLIT_DELIM_CAPTURE);
This line (Line 799 SearchController.php) doesn't find a match, to highlight, when starting with a special char like Ü or Æ, but if the text is with lowercase ü and æ it does, if there is a match in text of course. The `/i` modifier should make it case-insensitive, but doesn't seem to work like expected.
Will see if I can figure out a solution.
Updated by Tomas Norre Mikkelsen almost 2 years ago
Thanks to @Oliver Hader and @Frank Nägler for pointing me in the right direction. The solution was smaller than I expected.
PR will come asap.
Updated by Gerrit Code Review almost 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76874
Updated by Gerrit Code Review almost 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76894
Updated by Gerrit Code Review almost 2 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/+/76895
Updated by Tomas Norre Mikkelsen almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 765d5a89bb556e9bcd304995730a9ab3b7ffb8d8.