Skip to content

SwitchableControllerActionsPluginUpdater crashes on TYPO3 13+ with "Unknown column 'list_type'" #290

@FZigan

Description

@FZigan

Bug Description

SwitchableControllerActionsPluginUpdater throws a fatal Doctrine\DBAL\Exception\InvalidFieldNameException
on TYPO3 13+ because it queries the list_type column which was removed from tt_content in TYPO3 13.

Steps to Reproduce

  1. Install cart_products on TYPO3 13 or 14
  2. Run vendor/bin/typo3 upgrade:run --no-interaction
  3. Exception is thrown immediately

Error

Doctrine\DBAL\Exception\InvalidFieldNameException
An exception occurred while executing a query: Unknown column 'list_type' in 'SELECT'

Root Cause

In Classes/Updates/SwitchableControllerActionsPluginUpdater.php, the method getMigrationRecords()
directly queries list_type without first checking if the column exists:

return $queryBuilder
    ->select('uid', 'list_type', 'pi_flexform')
    ->from('tt_content')
    ->where(
        $queryBuilder->expr()->in('list_type', ...)
    )
    ->executeQuery()
    ->fetchAllAssociative();

This is called from updateNecessary() → checkIfWizardIsRequired() → getMigrationRecords(),
so the exception occurs even before any migration runs.

Expected Behavior
The wizard should check if the list_type column exists before querying it, similar to how
TYPO3\CMS\Core\Upgrades\AbstractListTypeToCTypeUpdate::columnsExistInContentTable() does it.
Alternatively, wrap the query in a try-catch in its MigratePlugins wizard.

Environment
TYPO3: 14.x
cart_products: dev-main
PHP: 8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions