Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MigrateMediaToAssetsForTextMediaCe is missing a condition for leftJoin #7

Open
julianhofmann opened this issue Oct 20, 2023 · 2 comments

Comments

@julianhofmann
Copy link
Contributor

In \TYPO3\CMS\v76\Install\Updates\MigrateMediaToAssetsForTextMediaCe::executeUpdate() there's the forth parameter in leftJoin missing. The join is processed without any condition.

https://github.com/WapplerSystems/core_upgrader/blob/release/v12/Classes/Updates/v76/MigrateMediaToAssetsForTextMediaCe.php#L90

Should be:

->leftJoin('sys_file_reference','tt_content','tt_content',
    $updateQueryBuilder->expr()->and(
        $updateQueryBuilder->expr()->eq(
            'uid_foreign', $updateQueryBuilder->quoteIdentifier('tt_content.uid')
        ),
        $updateQueryBuilder->expr()->eq(
            'tablenames', $updateQueryBuilder->createNamedParameter('tt_content', \PDO::PARAM_STR)
        ),
        $updateQueryBuilder->expr()->eq(
            'fieldname', $updateQueryBuilder->createNamedParameter('media', \PDO::PARAM_STR)
        ),
    )
)
@echavaillaz
Copy link

Even with the forth parameter, I got a fatal:

Column not found: 1054 Unknown column 'tt_content.CType' in 'where clause'

@julianhofmann
Copy link
Contributor Author

@echavaillaz, since it is a upgradewizard from v7, one way may be to deactivate the old wizards.
In my case, it was an upgrade from v9 to v12. We simply removed the wizards from v7, v8 and v9 in Services.yaml.
This doesn't actually fix the problem, but it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants