Upgrade fails (12.4.31 to 13.4.13)

Hello everyone,

I am currently trying to upgrade Typo3 from version 12.4.31 to version 13.4.13. After downloading the sources, I emptied the cache and tried to call the update wizard. However, this runs in an endless loop and an analysis of the database could not be completed either. I found the following message in the error log: An exception occurred while executing a query: Unknown column ‘ref_field’ in ‘SELECT’.

The following entries can also be found in the log:

Wed, 28 May 2025 13:03:48 +0200 [WARNING] request="a55c09478f38f" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Undefined array key "sys_template" in /path/to/typo3_src-13.4.13/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php line 1061
Wed, 28 May 2025 13:03:48 +0200 [WARNING] request="a55c09478f38f" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /path/to/typo3_src-13.4.13/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php line 1061

Are there other ways to trigger an upgrade or to find out what is the reason for the described behavior? … or are there perhaps other experience reports?

Best regards
Mathias

Funnily I had the same today. Your MySQL version is probably too old. I fixed this issue for me by upgrading to MySQL 8.0.

I’m using a MariaDB 10.6.21, so I think it meets the requirements.

Ah, ok!

Just to be sure, because “update wizard” might be ambigous. Can you execute “Maintenance > Analyze Database Structure” in the install tool, or are you saying that runs in a loop as well?

That would be what you first need to align, before you can perform the actual Upgrade Wizards.

The Database Structure analyzer can also be executed with the CLI typo3 binary (vendor/bin/typo3 extension:setup, but it seems you’re using the classic mode so your binary will be somewhere else, which I always forget where, because I’m using composer mainly).

Also maybe your browser’s network analyzer might be able to reveal errors in the AJAX call that the DB Analyzer returns…?

The missing column seems to be ref_field of the sys_refindex database table. If you can use a SQL database management tool like phpMyAdmin, Adminer, or the shell, you yould try to manually create it (as varchar(64) NOT NULL DEFAULT '')…

Thanks for your answer, your assumption is correct. “Analyze Database Structure” runs in a loop as well.
I will try out your tip and then report back. Have you experienced such upgrade problems more often?

Usually the DB analyzer is quite good. In my case it wasn’t really a loop, just a statement that never went away because it could not be applied as alter statements… (due to outdated mySQL on my end)