I have a pagination array like so:

public $paginate = array(
        'Login' => array(
                ...
                'order' => array('Login.created' => 'DESC'),
                'contain' => array(
                        'User' =>array(
                                'fields' => array(
                                        'User.first_name',
                                        'User.last_name',
                                        'User.company_name',
                                        'User.group_id'
                                ),
                                'Group' => array(
                                        'fields' => array('Group.name')
                                )
                        ),
                        ...
                )
        ),
        ...

In the view, I've got links created with:

$paginator->sort('Name', 'User.last_name', array('title' => 'sort by
last name'))
$paginator->sort('Company', 'User.company_name', array('title' =>
'sort by company'))
$paginator->sort('Group', 'User.group_id', array('title' => 'sort by group'))

Now, the company_name one creates a link like:

http://DOMAIN/admin/stats/index/page:2/sort:User.company_name/direction:asc

This works just fine. However, when I click that link to sort by
company (which works), my 'numbers' links look like:

http://DOMAIN/admin/stats/index/page:2/sort:company_name/direction:asc

Note that 'User' is missing from the sort param. Clicking this link
gives a result that is no longer being properly sorted.

The pagination links are created in an element which includes:

$paginator->options(
        array('url' => isset($url) ? $url : $this->passedArgs)
);

echo $paginator->numbers();

Has anyone ever run into this before?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to