Project

General

Profile

Actions

Bug #97986

closed

EXT:indexed_search search result description umlaut issue

Added by Benjamin Robinson over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2022-07-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

beltat.png (34.7 KB) beltat.png Benjamin Robinson, 2022-07-21 11:49
uebeltat.png (19.1 KB) uebeltat.png Benjamin Robinson, 2022-07-21 11:49
Actions #1

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.

Actions #2

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.

Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

Updated by Tomas Norre Mikkelsen almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF