Friday, December 11, 2015

Re: Is the automatic direction change broken in the paginator for the latest Cake 3 release?

I debugged it and discovered that sort options must be white listed if they are not part of the model.
I missed that in the documentation...


On Saturday, December 12, 2015 at 4:37:26 AM UTC+7, heavyKevy wrote:
Upon further examination, it works correctly for users, but fails for players....

On Saturday, December 12, 2015 at 4:08:21 AM UTC+7, heavyKevy wrote:
Sorry, I just updated to the latest 3.1.5,

after clicking the weight link.
while the browser is showing the same link: http://127.0.0.1/baseball/players/search?sort=weight&direction=asc
I would expect the new generated link to show desc...
It is not working correctly for me.
--Kevin

On Saturday, December 12, 2015 at 2:04:11 AM UTC+7, euromark wrote:
What "is" your latest cake3 release?
Are you referring to 3.0 or 3.1?

I highly doubt that, there are tests for this behavior.
Are there any links outputted at all?
What do they say?
You need to be more exact in your statements, or it is hard to say anything here.

mark



Am Freitag, 11. Dezember 2015 12:09:45 UTC+1 schrieb heavyKevy:
my index method has the following baked code.
$this->paginate = [
            'contain' => ['Users', 'Heights', 'Weights', 'Bats', 'Throws', 'PrimaryPositions', 'SecondaryPositions']
        ];
    $this->set ( 'players', $this->paginate ( $this->Players ) );

And my index.ctp is the standard baked template with the following sort link:
  <th><?= $this->Paginator->sort('username') ?></th>

According to the documentation, if I click the title Username, it should default to ASC, then Alternate between ASC and DESC.
Mine never alternates...

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: