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

Sorting doesn't work after Doctrine update #277

Closed
jkondratowicz opened this issue Oct 27, 2014 · 13 comments
Closed

Sorting doesn't work after Doctrine update #277

jkondratowicz opened this issue Oct 27, 2014 · 13 comments

Comments

@jkondratowicz
Copy link

After updating Doctrine ORM to 2.4.6, result sorting stopped working (with the newest version of KnpPaginatorBundle). Query parameters are properly intercepted and isSorted() in Twig works as expected, it's just that order of rows returned from Doctrine is not affected by fields selected using Pagination.

I reverted Doctrine to version 2.4.4 and things are working as expected again.

@archie18
Copy link

Same here. Paging works, but sorting does not.
doctrine/orm v2.3.6
knplabs/knp-components 1.3.1
knplabs/knp-paginator-bundle dev-master 701dffe

After downgrading knp-components sorting works again:
doctrine/orm v2.3.6
knplabs/knp-components 1.2.5
knplabs/knp-paginator-bundle 2.3.3

@Marcus-E-mode
Copy link

I've got the same problem, i downgraded to :
"knplabs/knp-components": "1.2.1",
"knplabs/knp-paginator-bundle": "~2.3"

The default sorting works in the twig but don't update the query with the asked default order :

$pagination = $knpPaginator->paginate(
$query,
$this->get('request')->query->get('page', 1), // page number
20,
array(
'defaultSortFieldName' => 'u.id',
'defaultSortDirection' => 'desc',
)
);

@jkondratowicz
Copy link
Author

Weirdly enough after upgrading Symfony to 2.4 (from 2.3) seems to fix the issue, it now works with "knplabs/knp-paginator-bundle": "2.4.1".

@felixq
Copy link

felixq commented Nov 25, 2014

Solution for symfony 2.3
Upgrade doctrine/orm to version v2.4.6 and KnpPaginatorBundle to version 2.4.1, not dev-master.

@sgupta07
Copy link

Hi,

I am new and facing same issue, I even do not know how to downgrade knplabs/knp-components or knplabs/knp-paginator-bundle. Some one please help me?

@felixq
Copy link

felixq commented Dec 15, 2014

For Symfony 2.3. Edit composer.json.
"require": {
...
"symfony/symfony": "2.3.*",
"doctrine/orm": "~2.2,>=2.2.3",
...
"knplabs/knp-paginator-bundle": "~2.4",
...
},

Run 'composer update'.

@sgupta07
Copy link

Thanks @felixq

@zsimaiof
Copy link

Hi. I am using Symfony 2.5.5 with :
doctrine/orm v2.3.6
.....
knplabs/knp-components 1.3.1
knplabs/knp-paginator-bundle dev-master b51aa32

Sorting DOES NOT work and also pagination works but styling is wrong (see atached image)
Could someone please tell me a working configuration ?
Thank you

knperrorsample

@sgupta07
Copy link

I faced issue with multiple join queries and I have downgraded my
knplabs/knp-components 1.3.1 to knplabs/knp-components 1.2.5 and issue has
been resolved, you can try the same.

On Thu, Dec 18, 2014 at 9:39 PM, zsimaiof notifications@github.com wrote:

Hi. I am using Symfony 2.5.5 with :
doctrine/orm v2.3.6
.....
knplabs/knp-components 1.3.1

knplabs/knp-paginator-bundle dev-master b51aa32
b51aa32

Sorting DOES NOT work and also pagination works but styling is wrong (see
atached image)
Could someone please tell me a working configuration ?
Thank you

[image: knperrorsample]
https://cloud.githubusercontent.com/assets/4517714/5491346/ee69b130-86e0-11e4-8a1b-93e16d11a77a.jpg


Reply to this email directly or view it on GitHub
#277 (comment)
.

Saurabh Gupta
Website: http://modernmonkslab.com
Phone : 09987055081

|* Hare Krishna*

@zsimaiof
Copy link

@sgupta07 Thank you !!! sorting now works fine.
Nevertheless, the styling problem at the page links (as shown in image above) persists.
Any ideas?

@sgupta07
Copy link

you can extend paginator view "Resources/views/Pagination/sliding.html.twig"
in app > Resource by giving same folder structure. and there you can change style and CSS

On Fri, Dec 19, 2014 at 6:35 PM, zsimaiof notifications@github.com wrote:

@sgupta07 https://github.com/sgupta07 Thank you !!! sorting now works
fine.
Nevertheless, the styling problem at the page links (as shown in image
above) persists.
Any ideas?


Reply to this email directly or view it on GitHub
#277 (comment)
.

Saurabh Gupta
Website: http://modernmonkslab.com
Phone : 09987055081

|* Hare Krishna*

@MichaelBrauner
Copy link

Ähhm I went in the same problem and lost a hole day going crazy. Can this not be fixed by the developers. I mean, that the bundle does, what is it build for.. is essential in my opinion.
Can not be the solution to downgrade all the stuff :S

@polc
Copy link
Contributor

polc commented Sep 13, 2017

Since Symfony 2.3 is not supported anymore and it work for superiors versions I'm closing. Feel free to open an other issue if the issue appear again.

@polc polc closed this as completed Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants