Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23595

PDOException in UserService createUser(): Integrity constraint violation

    XMLWordPrintable

    Details

      Description

      After creating and removing a number of users, the following exception is ocurring in UserService::createUser():

            exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '131' for key 'PRIMARY'' in vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91
            Stack trace:
            #0 vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execute(NULL)
            #1 vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(165): Doctrine\DBAL\Driver\PDOStatement->execute(NULL)
            #2 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/User/Gateway/DoctrineDatabase.php(81): Doctrine\DBAL\Statement->execute()
            #3 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/User/Gateway/ExceptionConversion.php(51): eZ\Publish\Core\Persistence\Legacy\User\Gateway\DoctrineDatabase->createUser(Object(eZ\Publish\SPI\Persistence\User))
            #4 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/User/Handler.php(81): eZ\Publish\Core\Persistence\Legacy\User\Gateway\ExceptionConversion->createUser(Object(eZ\Publish\SPI\Persistence\User))
            #5 ezpublish/cache/behat/ezpublishBehatDebugProjectContainer.php(31240): eZ\Publish\Core\Persistence\Legacy\User\Handler->create(Object(eZ\Publish\SPI\Persistence\User))
            #6 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/UserHandler.php(29): eZPublishCorePersistenceLegacyUserHandler_0000000036fa1f81000000006333291b->create(Object(eZ\Publish\SPI\Persistence\User))
            #7 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/UserService.php(502): eZ\Publish\Core\Persistence\Cache\UserHandler->create(Object(eZ\Publish\SPI\Persistence\User))
            #8 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/UserService.php(212): eZ\Publish\Core\Repository\UserService->createUser(Object(eZ\Publish\Core\Repository\Values\User\UserCreateStruct), Array)
            #9 vendor/ezsystems/behatbundle/EzSystems/BehatBundle/ObjectManager/User.php(272): eZ\Publish\Core\SignalSlot\UserService->createUser(Object(eZ\Publish\Core\Repository\Values\User\UserCreateStruct), Array)
            #10 vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Repository.php(299): EzSystems\BehatBundle\ObjectManager\User->EzSystems\BehatBundle\ObjectManager\{closure}(Object(eZ\Publish\Core\Repository\Repository))
      

      Upon further investigation, it seems there are "ghost" rows in ezuser_setting table.
      Removing these rows resolves the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                joao.inacio-obsolete@ez.no Joao Inacio (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: