CakePHP: Problems with route and pagination

0

I have a problem with the CakePHP routes.

I have the following URL: link And it works normally. The problem is when I go to the second page: link

Error: The requested address '/Produtos/index/61/789/page:2' was not found on this server.

I entered a configuration entry in Config / routes.php , but it did not work.

Router::connect(
    '/Produtos/index/:cat/:id/page:page', 
    [
        'controller' => 'Produtos',
        'action' => 'index'
    ],
    [
        'pass' => ['id', 'cat', 'page'],
        'id' => '[0-9]+',
        'cat' => '[0-9]+',
        'page' => '[0-9]+'
    ]
);

Can you help me?

    
asked by anonymous 25.01.2017 / 21:12

1 answer

0

Edit page: page for : page

Router::connect(
    '/Produtos/index/:cat/:id/:page', 
    [
        'controller' => 'Produtos',
        'action' => 'index'
    ],
    [
        'pass' => ['id', 'cat', 'page'],
        'id' => '[0-9]+',
        'cat' => '[0-9]+',
        'page' => '[0-9]+'
    ]
);

Obs. I tested CakePhp 2x

    
27.01.2017 / 14:42