Issue Bug Closed

#106805SysFileMimeTypeMigration fails if extension in uppercase

Ivan Dharma Kartolo 06/02/25, 07:54 updated 12/02/25, 13:59

Description

While updating a site to v12.4.32, the migration task typo3 upgrade:run per cli fails with the error:

run /usr/bin/php /absolute/path/to/releases/232/vendor/bin/typo3 upgrade:run --verbose --no-interaction

   [ LogicException ]  
   Invalid query…    

 Exception code: 1747912272
 Exception trace:
 #0 ()
    vendor/typo3/cms-install/Classes/Updates/SysFileMimeTypeMigration.php:111
 #1 TYPO3\CMS\Install\Updates\SysFileMimeTypeMigration->getMimeTypesThatNeedUpdate()

problem is caused by file extension (a CSV file) in sys_file which is in capital letter.

Workaround for the problem is, to create a MIME type mapping:

$GLOBALS['TYPO3_CONF_VARS']['SYS'] = [
    'FileInfo' => [
        'mimeTypeCompatibility' => [
            'text/plain' => [
                'CSV' => 'text/csv'
            ]
        ]
    ],
]

Or convert $row['extension'] to lower in https://github.com/TYPO3/typo3/blob/main/typo3/sysext/install/Classes/Updates/SysFileMimeTypeMigration.php#L109

#106735

Reviews 3

History 610

  1. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-06-10T08:30:35+00:00" > 06/10/25, 08:30 </span>

    Applied in changeset commit:efb6869beb5ff5e8575a84a590b249d6d4941ab4.