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)

Hello again,

after trying the extension:setup command again, I can now log in to the frontend. The analysis of the database structure is still running for a very long time and does not give any feedback. A look at the response of the Ajax request shows that a deprecation message makes it impossible to read the response.

This concerns the use of IconRegistry in the ext_localconf.php file. I cannot find this in my local extensions. Is there a way to localize the use of deprecation?

Best regards,
Mathias

Only after I commented out lines 381 to 387 in the class \TYPO3\CMS\Core\ServiceProvider was the wizard able to run successfully.

For the update, did you use the code scanner to fix migrations/errors in your extensions first? Sounds as if you might have custom extensions.

For the DB analyzer and everything to work properly, the extension infrastructure needs to be in order. According to the upgrade recommendations you might want to disable all custom extensions first to get the base system working, and then address updates in your custom extensions.

Also, you could/should run typo3-rector for example on your project to fix some usual tasks.

Also, always read the ‘breaking changes’ and ‘deprecations’ and ‘important’ notes for major updates. Sorry to point this out quite later, but I was thinking you just used the TYPO3 core and not custom extensions at this point.

I use my own extensions and have now made the individual changes to the old code base. However, I cannot find the use of the IconRegistry.

Thank you for the tip about the typo3-rector, I will look into it more.

Best regards

This is pretty crazy now, I’ve removed everything from the extension so I can find the culprit. But after clearing the cache this error still occurs. Only if I remove the following line from ext_localconf.php, then the deprecation message disappears:

ExtensionManagementUtility::addStaticFile($extensionKey, ‘Configuration/TypoScript’, ‘Template’);

As I said, there is currently no other file or configuration in the extension.

Do you have any ideas?

Edit: The checks for TCA, Broken Extensions and TCA Migrations have all run successfully. The scan of the extension files is also green.

Problem solved! I had to copy the line from above into sys_template.php and then it works. @ghi Thanks for your input :wink: