Issue Bug Closed

#102375Data too long for column 'cookie' when inserting into index_stat_search

Andreas Krämer 11/15/23, 13:00 updated 04/06/24, 11:21

Description

Hi there,

today I updated a website to TYPO3 ELTS 10.4.41 and now the indexed_search throws the following error when performing a search request:

An exception occurred while executing 'INSERT INTO `index_stat_search` (`searchstring`, `searchoptions`, `feuser_id`, `cookie`, `IP`, `hits`, `tstamp`) VALUES (?, ?, ?, ?, ?, ?, ?)' with params ["...", "...", 123, "4acf8ddc34c4bd2f20fe09de9b95e1dd.a0434104194776105dcb902219b99f71af58d82724f5e7ea2eaac9d7e89d7ac3", "...", 4, 1700048704]: Data too long for column 'cookie' at row 1

I guess it is a combination of MySQL strict mode and the cookie security fix: https://github.com/typo3/typo3/commit/8fdec56561
Most likely TYPO3 11.5.33 and 12.4.8 are also affected (not tested).

Possible solutions:
  • Remove cookie column from index_stat_search (why is this stored anyway?)
  • Truncate cookie value after 32 chars
  • Increase size of cookie column

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.