From 11f46d0acf436ac7d38434c665598876945682c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 20 Oct 2026 11:46:43 +0200 Subject: [PATCH] fix: use utf8mb4 for the database connection and new tables --- public/typo3conf/AdditionalConfiguration.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/typo3conf/AdditionalConfiguration.php b/public/typo3conf/AdditionalConfiguration.php index 82a170c6..f8926232 100644 --- a/public/typo3conf/AdditionalConfiguration.php +++ b/public/typo3conf/AdditionalConfiguration.php @@ -90,6 +90,14 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline'] // by the CDN, so stop generating them. mod_deflate still compresses direct origin hits. $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 0; +// utf8 in MySQL/MariaDB is utf8mb3 (max. 3 bytes) and rejects 4-byte characters like emoji. +// Set here because LocalConfiguration.php is a Deployer shared file and not deployed from the repo. +$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['charset'] = 'utf8mb4'; +$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions'] = [ + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_unicode_ci', +]; + // suppress php deprecation warnings flooding typo3 logs $GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] = $GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;