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
Improve pagination when user has lot of entries #1918
Conversation
Fix #1905 * Usage of whiteoctober/WhiteOctoberPagerfantaBundle
if ($page > 1) { | ||
return $this->redirect($this->generateUrl($type, array('page' => $entries->getNbPages())), 302); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WhiteOctoberPagerfantaBundle adds this behavior, see https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle#making-bad-page-numbers-return-a-http-500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you have to define it right? Because I guess that by default, the bundle doesn't redirect to the latest page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right.
I thought that our previous behavior was to avoid an Exception. But no, it was really to redirect (#1551).
Will fix that.
@@ -7,16 +7,9 @@ | |||
<div class="results"> | |||
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> | |||
<div class="pagination"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong here
It's really sad that pagerfanta (the lib not the bundle) didn't get any update since 2014 😞 |
Fix #1905
Usage of https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle
TODO