#111515FinisherTranslationLanguageUpgradeWizard passes an array to Connection::update() for form_definition
Description
The upgrade wizard `formFinisherTranslationLanguageMigration`, introduced with 1(https://forge.typo3.org/issues/87675) in TYPO3 14.3.12, fails when migrating form definitions stored in the database (`form_definition`).
The wizard passes an array directly to the database connection instead of JSON-encoding it before updating the `configuration` column.
Steps to reproduce
1. Install TYPO3 14.3.12.
2. Create a record in `form_definition` containing an email finisher with `options.translation.language` set to a translated label, e.g. `Standard` (as stored by the form editor before #87675).
3. Run the upgrade wizard:
vendor/bin/typo3 upgrade:run formFinisherTranslationLanguageMigration
Actual behavior
With `E_WARNING` included in `exceptionalErrors`, the upgrade wizard aborts after migrating the form plugins. Database-stored form definitions are not migrated.
Exception:
[ TYPO3\CMS\Core\Error\Exception ]
PHP Warning: Array to string conversion in
vendor/doctrine/dbal/src/Driver/Mysqli/Statement.php line 73
Without `E_WARNING` in `exceptionalErrors`, PHP converts the array to the string `“Array”`, which could subsequently be written to the `configuration` column (not tested).
Expected behavior
Database-stored form definitions should be migrated successfully, with the updated configuration serialized as JSON before being persisted.
Root cause
In `Classes/Upgrades/FinisherTranslationLanguageUpgradeWizard.php`:
Line 224 – `migrateFormDefinition()`
The method returns `?array` using:
return $this->jsonObjectKeyOrderPreserver->protect($formDefinition);
Line 113 – `executeUpdate()`
The returned array is passed directly to the database connection:
$connection->update(
'form_definition',
['configuration' => $migratedConfiguration],
// ...
)
However, `FormDefinitionRepository` (line 187) explicitly JSON-encodes the same structure before persisting it:
json_encode(
$this->jsonObjectKeyOrderPreserver->protect(...),
JSON_THROW_ON_ERROR
)
The upgrade wizard omits this serialization step, causing Doctrine DBAL to receive an array where a string is expected.
Suggested fix
JSON-encode the migrated configuration before passing it to the database connection:
[
'configuration' => json_encode(
$migratedConfiguration,
JSON_THROW_ON_ERROR
),
]
This aligns the upgrade wizard’s persistence behavior with `FormDefinitionRepository` and prevents the array-to-string conversion warning.
## Environment
- TYPO3 version: 14.3.12
- Component: EXT:form
- Affected wizard: `formFinisherTranslationLanguageMigration`
- Affected table: `form_definition`
- Database driver: MySQLi / Doctrine DBAL
- Regression reference: #87675
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] FinisherTranslationLanguageUpgradeWizard passes an array to Connection::update() for form_definition Resolves: #111515 Releases: main
Related issues 1
History 4
-
Aristeidis Karavas changed PHP Version
8.48.5 <span data-processor="relativetime" data-value="2026-11-20T09:16:01+00:00" > 11/20/26, 09:16 </span> -
Aristeidis Karavas changed Related to #87675 <span data-processor="relativetime" data-value="2026-11-20T09:16:56+00:00" > 11/20/26, 09:16 </span>
-
Josua Vogel changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-11-20T13:45:04+00:00" > 11/20/26, 13:45 </span>
Thanks for the detailed report. I could reproduce the warning, but only when
@form_definition.configuration@ is not detected as a JSON column. On a freshly set up
schema, the wizard works on MySQL 8.0/8.4, MariaDB 10.4/10.11/11.8, PostgreSQL and SQLite.
To find out why your column is different, could you please provide:
SELECT VERSION();SHOW CREATE TABLE form_definition;MariaDB (or the other way round), or changed with tools like pt-online-schema-change
or gh-ost? Was the column changed by hand?
form_definition?