Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonataAdminBundle: Redirect to list view doesn't save pagination

I have a project using Symfony 2.5 with SonataAdminBundle (http://sonata-project.org/) with a list of Posts, using pagination and list filtering that comes generic with the bundle.

If I go to n-th page using pagination, then go to 'Edit' page and click 'Update and close', when it's done updating, it returns me to the first page of my list. Same happens with 'Show' action when I want to return using breadcrumbs, it returns to page 1. Same scenario with a filtered list.

Is there a way to save the URL of the list (with pagination/filters enabled) and make sure it returns to the point it came from after editing ?

Thanks in advance,

Ulugbek

like image 780
Ulugbek Avatar asked Jan 25 '26 09:01

Ulugbek


1 Answers

I was able to enable this behavior with this config addition in app/config/config.yml:

sonata_admin:
    persist_filters: true

This was available in a project running sonata-project/admin-bundle version ~3.13.

like image 66
John Pancoast Avatar answered Jan 27 '26 21:01

John Pancoast



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!