#106912The flexform migration is reporting old errors over and over again
Description
Hi everyone.
The flexform migration is reporting old errors for every field that is processes. Depending on the number of processed fields, it floods the deprecation log.
*What is happening in the code*
Here https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php#L635
the field gets processed. We use the same instance repeatedly.
Here https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php#L636
we retrieve the messages from the processing.
Here https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/core/Classes/Configuration/Tca/TcaMigration.php#L103
you can find the getter for the messages.
Here https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/core/Classes/Configuration/Tca/TcaMigration.php#L37
are the messages stored in the TcaMigration class.
- We are using the same instance of the TcaMigration class repeatedly.
- The messages in the top of the TcaMigration class are not reset with a new use of this class
- Set up a new TYPO3 13
- Install TT-Address. It has some older flexforms due to its compatibility to older TYPO3 versions
- Create a flexform using content element
- Get a
trigger_error(implode(LF, $messages), E_USER_DEPRECATED);with the same messages repeatedly.
*Proposed solution*
Reset the $this->messages with every call of the $this->tcaMigration->migrate($dummyTca);
here: https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/core/Classes/Configuration/Tca/TcaMigration.php#L49
Could look like this:
/**
* Run some general TCA validations, then migrate old TCA to new TCA.
*
* This class is typically called within bootstrap with empty caches after all TCA
* files from extensions have been loaded. The migration is then applied and
* the migrated result is cached.
* For flex form TCA, this class is called dynamically if opening a record in the backend.
*
* See unit tests for details.
*/
public function migrate(array $tca): array
{
$this->messages = [];
$this->validateTcaType($tca);
$this->deprecateSubTypes($tca);
$tca = $this->migrateColumnsConfig($tca);
$tca = $this->migratePagesLanguageOverlayRemoval($tca);
. . .
Tobi
Reviews 3
Related issues 1
History 310
-
Gerrit Code Review pushed patch set 1 for main to change 89774 status
NewUnder Review <span data-processor="relativetime" data-value="2025-06-19T08:31:29+00:00" > 06/19/25, 08:31 </span> -
Gerrit Code Review pushed patch set 2 for main to change 89774 <span data-processor="relativetime" data-value="2025-06-19T08:33:31+00:00" > 06/19/25, 08:33 </span>
-
Garvin Hicking changed Related to #104268 <span data-processor="relativetime" data-value="2025-06-19T08:34:45+00:00" > 06/19/25, 08:34 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 89774 <span data-processor="relativetime" data-value="2025-06-19T10:48:38+00:00" > 06/19/25, 10:48 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 89774 <span data-processor="relativetime" data-value="2025-06-19T18:50:59+00:00" > 06/19/25, 18:50 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 89774 <span data-processor="relativetime" data-value="2025-06-19T19:00:25+00:00" > 06/19/25, 19:00 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89789 <span data-processor="relativetime" data-value="2025-06-23T10:18:42+00:00" > 06/23/25, 10:18 </span>
-
Gerrit Code Review pushed patch set 2 for 13.4 to change 89789 <span data-processor="relativetime" data-value="2025-06-23T10:39:01+00:00" > 06/23/25, 10:39 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-06-23T10:55:08+00:00" > 06/23/25, 10:55 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:22:37+00:00" > 12/02/25, 14:22 </span>
Applied in changeset commit:76eb108f35940c319093c84b84297f4e6ba31240.