You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create this query for the Paginator, I get an error message.
When I comment out the second andWhere(), it works.
Error
ymfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Knp\Component\Pager\Event\Subscriber\Filtration\Doctrine\ORM\Query\WhereWalker::expressionContainsFilter() must be an instance of Doctrine\ORM\Query\AST\ConditionalExpression, instance of Doctrine\ORM\Query\AST\ConditionalPrimary given, called in /var/www/symfony/vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php on line 192
at vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php:132
at Knp\Component\Pager\Event\Subscriber\Filtration\Doctrine\ORM\Query\WhereWalker->expressionContainsFilter(object(ConditionalPrimary), array(object(LikeExpression)))
(vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php:192)
at Knp\Component\Pager\Event\Subscriber\Filtration\Doctrine\ORM\Query\WhereWalker->primaryContainsFilter(object(ConditionalPrimary), array(object(LikeExpression)))
(vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php:158)
at Knp\Component\Pager\Event\Subscriber\Filtration\Doctrine\ORM\Query\WhereWalker->termContainsFilter(object(ConditionalTerm), array(object(LikeExpression)))
(vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php:97)
at Knp\Component\Pager\Event\Subscriber\Filtration\Doctrine\ORM\Query\WhereWalker->walkSelectStatement(object(SelectStatement))
(vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChain.php:113)
at Doctrine\ORM\Query\TreeWalkerChain->walkSelectStatement(object(SelectStatement))
(vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:388)
at Doctrine\ORM\Query\Parser->parse()
(vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php:264)
at Doctrine\ORM\Tools\Pagination\Paginator->getCountQuery()
(vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php:124)
at Doctrine\ORM\Tools\Pagination\Paginator->count()
at count(object(Paginator))
(vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber/UsesPaginator.php:50)
at Knp\Component\Pager\Event\Subscriber\Paginate\Doctrine\ORM\QuerySubscriber\UsesPaginator->items(object(ItemsEvent), 'knp_pager.items', object(TraceableEventDispatcher))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:104)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ItemsEvent), 'knp_pager.items', object(ContainerAwareEventDispatcher))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212)
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'knp_pager.items', object(ItemsEvent))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('knp_pager.items', object(ItemsEvent))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:139)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('knp_pager.items', object(ItemsEvent))
(vendor/knplabs/knp-components/src/Knp/Component/Pager/Paginator.php:114)
at Knp\Component\Pager\Paginator->paginate(object(Query), 1, 20, array('pageParameterName' => 'page', 'sortFieldParameterName' => 'sort', 'sortDirectionParameterName' => 'direction', 'filterFieldParameterName' => 'filterField', 'filterValueParameterName' => 'filterValue', 'distinct' => true))
(var/cache/dev/ContainerI7oxuiv/Paginator_f262b94.php:40)
at Paginator_f262b94->paginate(object(Query), 1, 20)
(src/CRMBundle/Controller/PaginationController.php:40)
at CRMBundle\Controller\PaginationController->getPagination('CRMBundle:Lokal', 1, 20, object(Query))
(src/CRMBundle/Controller/LokaleController.php:169)
at CRMBundle\Controller\LokaleController->listFavoritenAction(object(Request), 'html')
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:33)
When I create this query for the Paginator, I get an error message.
When I comment out the second
andWhere()
, it works.Error
Code
The text was updated successfully, but these errors were encountered: