symfony2admingenerator / GeneratorBundle

Admingenerator for Symfony. Parse YAML files to build customized backend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination page 1 problem

montabou opened this issue · comments

On list view if I go to page 2 everything is OK but if I try to go back to page 1 it stays on page 2.
The link is ?page=2 for page 2 but the parameter is empty for page 1.
I don't know if the problem is here

if ($this->request->query->get('page')) {

if ($this->request->query->get('page')) {
    $this->setPage($this->request->query->get('page'));
} else {
    $this->setPage(1);
}

This is already fixed in 33694db (see #266). Problem was with the PagerfantaBundle, you will need to have >=1.0.6.

Note that this commit is not yet in a release (I'm waiting on #265 before releasing 2.1). However, simply updating the PagerfantaBundle yourself should do the trick.

Oups sorry, using PagerfantaBundle 1.0.6 works. Thx