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

Update RC2 to RC3: An exception occurred while executing 'SELECT DISTINCT author FROM tl_article WHERE id IN()' #2125

Closed
BugBuster1701 opened this issue Aug 8, 2020 · 6 comments
Labels
Milestone

Comments

@BugBuster1701
Copy link
Contributor

BugBuster1701 commented Aug 8, 2020

Affected version(s)

Contao 4.10. RC3

Description

This error occurs after updating RC2 to RC3.
PHP 7.4
MySQL 8.0.21

The error ist shown when:

  • articles
    is clicked on the left menu

Deleting the user session was not successful.

 PDOException 1:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78
  at PDO->query()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78)
  at Doctrine\DBAL\Driver\PDOConnection->query()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:911)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:274)
  at Contao\Database\Statement->query()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:248)
  at Contao\Database\Statement->execute()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:5698)
  at Contao\DC_Table->filterMenu()
     (vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:1170)
  at Contao\DataContainer->panel()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:352)
  at Contao\DC_Table->showAll()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:644)
  at Contao\Backend->getBackendModule()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:48)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/index.php:31)

PDOException 2

Doctrine\DBAL\Driver\PDOException:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:83
  at Doctrine\DBAL\Driver\PDOConnection->query()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:911)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:274)
  at Contao\Database\Statement->query()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:248)
  at Contao\Database\Statement->execute()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:5698)
  at Contao\DC_Table->filterMenu()
     (vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:1170)
  at Contao\DataContainer->panel()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:352)
  at Contao\DC_Table->showAll()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:644)
  at Contao\Backend->getBackendModule()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:48)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/index.php:31)

SyntaxErrorException

Doctrine\DBAL\Exception\SyntaxErrorException:
An exception occurred while executing 'SELECT DISTINCT `author` FROM tl_article WHERE id IN()':

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79
  at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169)
  at Doctrine\DBAL\DBALException::wrapException()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:149)
  at Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:914)
  at Doctrine\DBAL\Connection->executeQuery()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:274)
  at Contao\Database\Statement->query()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:248)
  at Contao\Database\Statement->execute()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:5698)
  at Contao\DC_Table->filterMenu()
     (vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:1170)
  at Contao\DataContainer->panel()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:352)
  at Contao\DC_Table->showAll()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:644)
  at Contao\Backend->getBackendModule()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:48)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/index.php:31)
@dayceegiordan
Copy link

dayceegiordan commented Aug 8, 2020

Try replacing your opening and closing hypens from ' to " and also : with ;

@BugBuster1701
Copy link
Contributor Author

Huh? The Problem ist IN() , not any hyphens. The code output is the trace in debug mode.

@BugBuster1701
Copy link
Contributor Author

Same Problem with click on "Site structure":

An exception occurred while executing 'SELECT DISTINCT `type` FROM tl_page WHERE id IN()': 
SQLSTATE[42000]: Syntax error or access violation: SELECT DISTINCT `type` FROM tl_page WHERE id IN()

@BugBuster1701
Copy link
Contributor Author

The problem is this commit:
a93f204#diff-e641f7127d9e8499138942f40dceafc3

If I reverse that, it'll work again.

@BugBuster1701
Copy link
Contributor Author

BugBuster1701 commented Aug 8, 2020

Sorry.
#2111
I try the fix shortly. (not yet in 4.10.x-dev)

@BugBuster1701
Copy link
Contributor Author

BugBuster1701 commented Aug 9, 2020

Fix is ok , tested in 4.10.x-dev
#2105

@leofeyer leofeyer added the bug label Aug 10, 2020
@leofeyer leofeyer added this to the 4.10 milestone Aug 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants