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
Broken sorting in 1.3.* #118
Comments
how you use it? |
controller action: $paginator = $this->get('knp_paginator');
$options = array(
'sortFieldWhitelist' => array( 'b.creationDate'),
'defaultSortFieldName' => 'b.creationDate',
'defaultSortDirection' => 'desc',
);
$items = $paginator->paginate($query, $this->get('request')->query->get('page', 1), $this->getUser()->getResultsPerPage(), $options); twig template: {{ knp_pagination_sortable(items, 'item.creationDate'|trans, 'b.creationDate') }}
{% for item in items %}
...
{% endfor %}
{{ knp_pagination_render(items) }} |
what is your query? |
I said, there are no errors. Simply nothing. Nothing in php.log. Nothing in dev.log. Nothing while stepping with Zend debugger. Everything looks perfect, except not working sorting. I will show you everything I can from not working sorting version. query in url:
btw. options defaultSortFieldName and defaultSortDirection do not work too. viz. my previous comment. composer installed:
config:
|
Same issues for me, worker with 1.2.5, but 1.3.1 does not work and no error. |
I think, this is related KnpLabs/KnpPaginatorBundle#277 to this issue |
Now it's working.
|
Hello @julban is your problem still occurring? |
Hi, sorry for my english.
Sorting do not work in latest versions.
Last working version is 1.2.5
It shows no error.
I do not know how sorting really works, but script never reach method \Knp\Component\Pager\Event\Subscriber\Sortable\Doctrine\ORM\Query\OrderByWalker::walkSelectStatement
The text was updated successfully, but these errors were encountered: