#89848Database Analyzer crashes with undefined enum fields
Description
When you have a field in a column of type enum that is not specified in a sql file in the installation, the Database Analyzer in the install tool will crash and throws the error “array_map(): Argument #2 should be an array in /var/www/html/typo3/sysext/core/Classes/Database/Schema/Types/EnumType.php line 38”. When you have the definition in a sql file of an extension, this won’t cause an issue.
How to reproduce:
- Create a new field in tt_content with type enum and some values and a random name
- Go to Database Analyzer in install tool and run it
Reviews 4
Related issues 2
Files 1
History 1116
-
Susanne Moog commented and changed attached Annotation 2019-12-05 151443.png status
NewNeeds Feedback <span data-processor="relativetime" data-value="2019-12-05T15:15:52+00:00" > 12/05/19, 15:15 </span> -
Richard Haeser commented <span data-processor="relativetime" data-value="2019-12-05T15:21:27+00:00" > 12/05/19, 15:21 </span>
Just executed your SQL and I get in the database analyzer:
TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'array_map(): Argument #2 should be an array', '/var/www/html/typo3/sysext/core/Classes/Database/Schema/Types/EnumType.php', 38, array('fieldDeclaration' => array('name' => 'zzz_deleted_foobar', 'type' => object(TYPO3\CMS\Core\Database\Schema\Types\EnumType), 'default' => 'NULL', 'notnull' => false, 'length' => null, 'precision' => 10, 'scale' => 0, 'fixed' => false, 'unsigned' => false, 'autoincrement' => false, 'columnDefinition' => null, 'comment' => ''), 'platform' => object(Doctrine\DBAL\Platforms\MariaDb1027Platform)))MariaDB: 10.2
Default DDEV setup (v1.11) -
Richard Haeser commented <span data-processor="relativetime" data-value="2019-12-05T15:23:21+00:00" > 12/05/19, 15:23 </span>
When I change \TYPO3\CMS\Core\Database\Schema\Types\EnumType::getSQLDeclaration to make sure an array is always forced, I get the same result as you. But try to execute that update command ;-)
-
Gerrit Code Review pushed patch set 1 for master to change 62543 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2019-12-05T15:32:14+00:00" > 12/05/19, 15:32 </span> -
Joerg Kummer commented <span data-processor="relativetime" data-value="2021-01-02T12:06:32+00:00" > 01/02/21, 12:06 </span>
Confirmed
-
Gerrit Code Review pushed patch set 2 for master to change 62543 <span data-processor="relativetime" data-value="2021-03-25T14:19:54+00:00" > 03/25/21, 14:19 </span>
-
Markus Klein changed Related to #100277 <span data-processor="relativetime" data-value="2024-08-03T07:20:15+00:00" > 08/03/24, 07:20 </span>
-
Markus Klein changed Related to #97498 <span data-processor="relativetime" data-value="2024-08-03T07:22:22+00:00" > 08/03/24, 07:22 </span>
-
Stefan Bürk changed assigned to Stefan Bürk <span data-processor="relativetime" data-value="2024-08-05T20:41:53+00:00" > 08/05/24, 20:41 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 87524 <span data-processor="relativetime" data-value="2024-12-17T13:50:30+00:00" > 12/17/24, 13:50 </span>
-
Stefan Bürk commented <span data-processor="relativetime" data-value="2024-12-17T13:54:54+00:00" > 12/17/24, 13:54 </span>
The descibed issue manifested within the custom EnumType implementation
of TYPO3 as symptom but the root cause layed in Doctrine DBAL itself.This has been accidently fixed in Doctrine DBAL 3.5.0 [1] and curretly
community supported TYPO3 version in the latest version are safe.Some tests should be added to cover this and to close this issue.
Fixes for TYPO3 v11 or earlier are not provided due to beeing ELTS.
-
Stefan Bürk changed TYPO3 Version
1012 <span data-processor="relativetime" data-value="2024-12-17T13:55:06+00:00" > 12/17/24, 13:55 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 87532 <span data-processor="relativetime" data-value="2024-12-17T13:58:49+00:00" > 12/17/24, 13:58 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87533 <span data-processor="relativetime" data-value="2024-12-17T13:59:14+00:00" > 12/17/24, 13:59 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-12-17T14:30:09+00:00" > 12/17/24, 14:30 </span>Applied in changeset commit:da0df561b43a3b4a7e063c63d5e7cfd5cb0c1ce6.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:36:46+00:00" > 12/02/25, 14:36 </span>
Hmm, I did:
Result – see attached screenshot. Database Analyzer is fine.