Shopware Backend Order Not Work

Hai.,

I got the Following errors, when I click the “Customer—> Order”

 

Oops! An error has occurred!

    
        The following notes should help you.
    

    An exception occurred while executing ‘SELECT count(DISTINCT s0_.id) AS sclr0 FROM s_order s0_ LEFT JOIN s_core_paymentmeans s1_ ON s0_.paymentID = s1_.id LEFT JOIN s_core_states s2_ ON s0_.cleared = s2_.id LEFT JOIN s_core_states s3_ ON s0_.status = s3_.id LEFT JOIN s_order_billingaddress s4_ ON s0_.id = s4_.orderID LEFT JOIN s_user s5_ ON s0_.userID = s5_.id LEFT JOIN s_order_details s6_ ON s0_.id = s6_.orderID LEFT JOIN s_core_countries s7_ ON s4_.countryID = s7_.id LEFT JOIN s_core_countries_states s8_ ON s4_.stateID = s8_.id LEFT JOIN s_core_shops s9_ ON s0_.subshopID = s9_.id LEFT JOIN s_premium_dispatch s10_ ON s0_.dispatchID = s10_.id LEFT JOIN s_order_billingaddress_attributes s11_ ON s4_.id = s11_.billingID LEFT JOIN  WHERE s0_.status NOT IN (’-1’) AND s0_.ordernumber IS NOT NULL’:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE s0_.status NOT IN (’-1’) AND s0_.ordernumber IS NOT NULL’ at line 1 in vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line 91

    Stack trace:
    
#0 vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(702): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(PDOException), ‘SELECT count(DI…’, Array)
#1 vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery(‘SELECT count(DI…’, Array, Array, NULL)
#2 vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(286): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#3 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(794): Doctrine\ORM\Query->_doExecute()
#4 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(598): Doctrine\ORM\AbstractQuery->execute(NULL, 3)
#5 vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(143): Doctrine\ORM\AbstractQuery->getScalarResult()
#6 Shopware/Controllers/Backend/Order.php(357): Doctrine\ORM\Tools\Pagination\Paginator->count()
#7 Shopware/Controllers/Backend/Order.php(330): Shopware_Controllers_Backend_Order->getList(NULL, NULL, ‘0’, ‘20’)
#8 Enlight/Controller/Action.php(159): Shopware_Controllers_Backend_Order->getListAction()
#9 Enlight/Controller/Dispatcher/Default.php(524): Enlight_Controller_Action->dispatch(‘getListAction’)
#10 Enlight/Controller/Front.php(227): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#11 Shopware/Kernel.php(143): Enlight_Controller_Front->dispatch()
#12 vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(490): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#14 vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(261): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#15 Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#16 shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#17 {main}

    
 

Hello,

your foreign keys seems to be corrupted. This article may help you:

Heiner

Hai.,

I have repair the Database as said in the above link.
But the error not solved