Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Missing full multibyte support in StatisticsWriterProcessor #4134

Open
dkd-friedrich opened this issue Aug 14, 2024 · 0 comments
Open
Assignees

Comments

@dkd-friedrich
Copy link
Member

Describe the bug

StatisticsWriterProcessor truncates the given search keyword to fit into the prepared keywords column of tx_solr_statistics. This leads to errors if the string is cut off at the wrong place, e.g. Incorrect string value: '\xE0\xB8' for column tx_solr_statistics.keywords at row 1

By using mb_substr() instead of substr() this issue can be fixed.

We should:

  • Use mb_substring()
  • Catch and handle exceptions that occur on insert in the statistics table to prevent errors in frontend

To Reproduce
Steps to reproduce the behavior:

  1. Activate statistics
  2. Trigger search with a long multi-byte string, like นักท่องเที่ยวที่เข้ามาในประเทศออสเตรียมีจำนวนทั้งหมดกี่คน

Expected behavior

  • Statistics entry can be written
  • Frontend is not affected, even if statistic record couldn't be written

Used versions (please complete the following information):

  • TYPO3 Version: 11, 12
  • EXT:solr Version: 11.5, 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants