[SOLVED] Typo3 upgrade 13.1.1 to 13.2.0 fails

Hello,
I have a working Typo3 v13.1.1 and am upgrading to v13.2.0. I can no longer access the installation tool and am getting these error messages:

1/1) #1519978105 TYPO3\CMS\Core\DependencyInjection\NotFoundException

Container entry “TYPO3\CMS\Install\Http\Application” is not available.
in /srv/www/typo3_src-13.2.0/typo3/sysext/core/Classes/DependencyInjection/FailsafeContainer.php line 100

        // Note: That is because the coalesce operator used in get() can not handle that
        return $this->entries[$id];
    }
    if ($factory === null) {
        throw new NotFoundException('Container entry "' . $id . '" is not available.', 1519978105);
    }
    // if ($factory === false)
    throw new ContainerException('Container entry "' . $id . '" is part of a cyclic dependency chain.', 1520175002);
}

at TYPO3\CMS\Core\DependencyInjection\FailsafeContainer->create()
in /srv/www/typo3_src-13.2.0/typo3/sysext/core/Classes/DependencyInjection/FailsafeContainer.php line 111

 * @return mixed
 */
public function get(string $id)
{
    return $this->entries[$id] ?? $this->create($id);
}

}

at TYPO3\CMS\Core\DependencyInjection\FailsafeContainer->get()
in /srv/www/typo3_src-13.2.0/typo3/install.php line 19

call_user_func(static function () {
$classLoader = require dirname(DIR).‘/vendor/autoload.php’;
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});

at {closure}()
in /srv/www/typo3_src-13.2.0/typo3/install.php line 20

call_user_func(static function () {
$classLoader = require dirname(DIR).‘/vendor/autoload.php’;
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});

Do you have a solution for me as to how I can upgrade further? As I said, everything works up to version 13.1.1. PHP is 8.2.23.
Thank you very much,
James

You should better upgrade to 13.4.0 LTS instead. You do not need the 13.2/3 steps in between.

The error you get can be cache related. Please try to use the CLI binary “bin/typo3 cache:flush” and/or execute “composer dumpautoload” to ensure fresh caches foe DI.

To be completely honest, I don’t know how that’s supposed to work. I’ve been working my way up step by step since 10.x.x. Now the three steps should be possible without switching to 13.4.0 LTS. In any case, I’ll probably have even bigger problems when switching to the next LTS version. It’s too opaque for me.

I can’t use “bin/typo3 cache:flush” and “composer dumpautoload” because I’m still using Legacy. And I’ve already cleared the cache sufficiently with
rm -rf typo3temp/var/cache/*
Thank you so far.

No worries, that’s what you’re here for :slight_smile:
Usually only the .0.0 versions are breaking changes. So 13.0.0 contained all the “woes” you have to pay attention for an upgrade.

If you used 13.0.0 before, you can directly go to 13.4.0 by just copying the files. You can then check for upgrade wizards and check the Database Compare tool for changes, but that’s all.

So in your case please just upload the 13.4.0 release files onto your setup. Then try to access the install tool. Sprint release before the 13.4.0 are usually for testing/developers. You might just have faced a bug in the “in-between” versions.

Hello Garvin,
Thank you for your understanding. I have now rebooted the entire web server so that the cache is
completely empty. After that, the error messages that were still there were gone and I was able to log into the Typo3 installation tool.
I have used the upgrade wizard and now I am doing the database compare in a continuous loop, so to speak.
I keep getting the same 511 lines:

ALTER TABLE `be_sessions` CHANGE `ses_id` `ses_id` VARCHAR(190) DEFAULT '' NOT NULL
Current value: `ses_id` VARCHAR(190) CHARACTER SET utf8mb3 DEFAULT '' NOT NULL COLLATE `utf8mb3_general_ci`
ALTER TABLE `be_sessions` CHANGE `ses_iplock` `ses_iplock` VARCHAR(39) DEFAULT '' NOT NULL
Current value: `ses_iplock` VARCHAR(39) CHARACTER SET utf8mb3 DEFAULT '' NOT NULL COLLATE `utf8mb3_general_ci`
ALTER TABLE `be_users` CHANGE `username` `username` VARCHAR(50) DEFAULT '' NOT ZERO
Current value: `username` VARCHAR(50) CHARACTER SET utf8mb3 DEFAULT '' NOT NULL COLLATE `utf8mb3_general_ci`
ALTER TABLE `be_users` CHANGE `description` `description` TEXT DEFAULT NULL
Current value: `description` TEXT CHARACTER SET utf8mb3 DEFAULT NULL COLLATE `utf8mb3_general_ci`
.
.
.
ALTER TABLE `sys_category_record_mm` CHANGE `tablenames` `tablenames` VARCHAR(64) DEFAULT '' NOT NULL
Current value: `tablenames` VARCHAR(64) CHARACTER SET utf8mb3 DEFAULT '' NOT NULL COLLATE `utf8mb3_general_ci`
ALTER TABLE `sys_category_record_mm` CHANGE `fieldname` `fieldname` VARCHAR(64) DEFAULT '' NOT NULL
Current value: `fieldname` VARCHAR(64) CHARACTER SET utf8mb3 DEFAULT '' NOT NULL COLLATE `utf8mb3_general_ci`

I have now also done the DB check via the BE and updated the reference index. After that, the same changes are displayed again in the DB Compare.
At least the page is working again.

As a test, I executed some of these ALTER SQL-commands directly in the database, with the result that nothing happens.

ALTER TABLE `be_sessions` CHANGE `ses_id` `ses_id` VARCHAR(190) DEFAULT '' NOT NULL;
Query OK, 0 rows affected (2,676 sec)
Records: 0  Duplicates: 0  Warnings: 0

ALTER TABLE `be_groups` CHANGE `custom_options` `custom_options` LONGTEXT DEFAULT NULL;
Query OK, 0 rows affected (0,120 sec)
Records: 0  Duplicates: 0  Warnings: 0

This can be a problem if you do not have the “tableoptions” DB connection infos set, see DB - Database connections — TYPO3 Explained 12.4 documentation

Once you add your collation and the charset to that array, the DB compare should pick up the conversion from utf8mb3 to utf8mb4.

(Or, if you configure utf8mb3, leave the tables untouched)

Thank you for the tip, but it doesn’t really help. I have now expanded my settings.php according to this scheme:

'Connections' => [
    'Default' => [
        'charset' => 'utf8mb4',
        'driver' => 'mysqli',
        'dbname' => 'typo3_database',
        'host' => '192.168.11',
        'password' => '***',
        'port' => 3306,
        'user' => 'typo3',
    ],
    'Sessions' => [
        'charset' => 'utf8mb4',
        'driver' => 'mysqli',
        'dbname' => 'typo3_database',
        'host' => '192.168.11',
        'password' => '***',
        'port' => 3306,
        'user' => 'typo3',
    ],
],
'TableMapping' => [
    'be_sessions' => 'Sessions',
]

If I now update the database with “Analyze Database” the same SQL commands appear one after the other. This is particularly crazy here

ALTER TABLE `be_sessions` RENAME TO `zzz_deleted_be_sessions`
DROP TABLE `zzz_deleted_be_sessions`

Because if I do that, then this message appears

Database update failed

    Error: Table 'zzz_deleted_be_sessions' already exists

And I should immediately create this table again

CREATE TABLE `be_sessions` (`ses_id` VARCHAR(190) DEFAULT '' NOT NULL, `ses_iplock` VARCHAR(39) DEFAULT '' NOT NULL, `ses_userid` INT UNSIGNED DEFAULT 0 NOT NULL, `ses_tstamp` INT UNSIGNED DEFAULT 0 NOT NULL, `ses_data` LONGBLOB DEFAULT NULL, INDEX `ses_tstamp` (ses_tstamp), PRIMARY KEY(ses_id))
in

order to delete it again in the same statement:

Drop tables (really!)


1. select/deselect all

2. DROP TABLE `zzz_deleted_be_sessions`

In between, the same old age instructions keep coming up. That makes no sense at all. This can make you very angry.

Your new settings are missing the ‘tableoptions’ key like I mentioned. Additionally, you are trying to mapp core tables to different database connections, but this is not supported by the TYPO3 core anymore (see Important: #102960 - TCA and system tables on one DB connection — TYPO3 Core Changelog main documentation). All core tables must “live” in the same connection space.

Thus, please try to use this config:

'Connections' => [
    'Default' => [
        'charset' => 'utf8mb4',
        'driver' => 'mysqli',
        'dbname' => 'typo3_database',
        'host' => '192.168.11',
        'password' => '***',
        'port' => 3306,
        'user' => 'typo3',
        'defaultTableOptions' => [
            'collation' => 'utf8mb4_unicode_ci',
            'charset' => 'utf8mb4',
        ],
    ],
]

Meanwhile it looks better after your advice. But still this output appears again and again:

Change fields

select/deselect all
ALTER TABLE `be_sessions` CHANGE `ses_id` `ses_id` VARCHAR(190) DEFAULT '' NOT NULL
Current value: `ses_id` VARCHAR(190) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_general_ci`
ALTER TABLE `be_sessions` CHANGE `ses_iplock` `ses_iplock` VARCHAR(39) DEFAULT '' NOT NULL
Current value: `ses_iplock` VARCHAR(39) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_general_ci`

Remove tables (rename with prefix)

select/deselect all
ALTER TABLE `be_sessions` RENAME TO `zzz_deleted_be_sessions`

Drop tables (really!)

select/deselect all
DROP TABLE `zzz_deleted_be_sessions`